Replies: 1 comment
-
Sorry for my mistake, as soon as I opened the discussion I realized that in componentNamespace I had written "Views" instead of "View". |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel 9.52.15
In my "core" package I use anonymous components putting them in "resources\views\components" folder of package so "x-core::slider" works fine.
If I need to use a class for the component I register it in the "boot" method of the service provider and also in this case "x-slider" works correctly.
Now I would like to use "componentNamespace" so as to automatically register the component classes but it doesn't work for me.
In this last case if I use the same "core" namespace in "componentNamespace" when I use "x-core::slider" the anonymous component replies directly without the class.
If I try to change the namespace:
Blade::componentNamespace('\\Packages\\Core\\Views\\Components', 'coretest');
And invoking the component I get the error:
"Unable to locate a class or view for component [coretest::slider]."
What am I doing wrong?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions