How to a Make Component by artisan command without class?

Viewed 125

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

1 Answers

well, you may create a sub-directory under components let's say ...components/buttons. Then just create a blade file representing your component for example round.blade.php. use this component in any template like so <x-buttons.round /> and your component will be rendered correctly in your template.

Related