and want to make it anonymous afterwards
Just run php artisan view:clear after deleting the Component class.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Dear community,
I have recently started to learn Laravel. In the process, I've run into a problem with blade components that keeps coming up and I don't know how to fix it. Every time I created a blade component in Laravel with Artisan and want to make it anonymous afterwards, I get an error that the class for the component doesn't exist. The blade component is supposed to be anonymous and not have a component class. If I create an anonymous blade component without ever having created a blade component with the same name with Artisan before, everything works fine. It would be very nice if someone could help me!
Best regards yxyx
and want to make it anonymous afterwards
Just run php artisan view:clear after deleting the Component class.
Please or to participate in this conversation.