Artisan.page

make:component

Create a new view component class

Terminal
php artisan make:component [--inline] [--view] [--path PATH] [-f|--force] [--test] [--pest] [--phpunit] [--] <name>

Options

forceOptional

Create the class even if the component already exists

inlineOptional

Create a component that renders an inline view

pathRequired

The location where the component view should be created

pestOptional

Generate an accompanying Pest test for the Component

phpunitOptional

Generate an accompanying PHPUnit test for the Component

testOptional

Generate an accompanying Test test for the Component

viewOptional

Create an anonymous component with only a view

Arguments

nameRequired

The name of the component