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

make:controller

Create a new controller class

Options

  • model - Generate a resource controller for the given model. Optional
  • resource - Generate a resource controller class. Optional
  • invokable - Generate a single method, invokable controller class. Optional
  • parent - Generate a nested resource controller class. Optional
  • api - Exclude the create and edit methods from the controller. Optional

Arguments

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