Create a new controller class


  • api - Exclude the create and edit methods from the controller Optional
  • creatable - Indicate that a singleton resource should be creatable Optional
  • force - Create the class even if the controller already exists Optional
  • invokable - Generate a single method, invokable controller class Optional
  • model - Generate a resource controller for the given model Optional
  • parent - Generate a nested resource controller class Optional
  • pest - Generate an accompanying Pest test for the Controller Optional
  • phpunit - Generate an accompanying PHPUnit test for the Controller Optional
  • requests - Generate FormRequest classes for store and update Optional
  • resource - Generate a resource controller class Optional
  • singleton - Generate a singleton resource controller class Optional
  • test - Generate an accompanying Test test for the Controller Optional
  • type - Manually specify the controller stub file to use Required


  • name - The name of the controller Required
php artisan make:controller [--api] [--type TYPE] [--force] [-i|--invokable] [-m|--model [MODEL]] [-p|--parent [PARENT]] [-r|--resource] [-R|--requests] [-s|--singleton] [--creatable] [--test] [--pest] [--phpunit] [--] <name>