The Laravel Artisan Cheatsheet now has an API. Learn more.

make:component

Create a new view component class

Options

  • force - Create the class even if the component already exists Optional
  • inline - Create a component that renders an inline view Optional
  • view - Create an anonymous component with only a view Optional
  • test - Generate an accompanying PHPUnit test for the Component Optional
  • pest - Generate an accompanying Pest test for the Component Optional

Arguments

  • name - The name of the component Required
php artisan make:component [-f|--force] [--inline] [--view] [--test] [--pest] [--] <name>