Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to a Make Component by artisan command without class?

I want to make a component in Laravel 8 by this command: php artisan make:component forms.input --view that means i want a component with only a Blade template and no class. But i m Getting this ERROR: The "--view" option does not exist. Thanks for the tips

like image 738
Hadi Hasanpur Avatar asked Jan 25 '26 13:01

Hadi Hasanpur


1 Answers

If you don't have a components folder, I would suggest making that first. Generally, I usually put mine under resources/views/components.

Then if you want to create a view for your component without a class, you can use this command:

php artisan make:component COMPONENT_NAME --view

This is on Laravel 10

like image 58
beezee Avatar answered Jan 28 '26 02:01

beezee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!