make:controller

Create a new controller class

Options

  • api - Exclude the create and edit methods from the controller. 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
  • requests - Generate FormRequest classes for store and update. Optional
  • resource - Generate a resource controller class. Optional
  • test - Generate an accompanying PHPUnit test for the Controller Optional
  • type - Manually specify the controller stub file to use. Required

Arguments

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