Hello everyone,
I’m facing an issue with Sage and Acorn where I’m unable to locate a class or view for a custom component I’ve created. I’m using Sage 10 with Laravel/Acorn and have followed the instructions to create a new component.
Here’s what I’ve done so far:
-
Created the component using the Acorn CLI command:
wp acorn make:component Block/BrandList -
The component class (BrandList.php) has been generated in the
app/View/Components/Block
directory with the correct namespace:
namespace App\View\Components\Block; -
The corresponding Blade view file is located at
resources/views/components/block/brand-list.blade.php
. -
I’ve cleared the view cache using:
wp acorn view:clear -
In my Blade template, I’m including the component with:
Despite following these steps, I still get the error:
Unable to locate a class or view for component [block-brand-list].
I’ve double-checked the file paths, namespaces, and tried clearing the cache, but I can’t seem to resolve the issue.
Any help or guidance on what I might be missing would be greatly appreciated. Thanks in advance!