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
  • resource - Generate a resource controller class. Optional

Arguments

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