Artisan.page

make:controller

Create a new controller class

Terminal
php artisan make:controller [--api] [--force] [-i|--invokable] [-m|--model [MODEL]] [-p|--parent [PARENT]] [-r|--resource] [--] <name>

Options

apiOptional

Exclude the create and edit methods from the controller.

forceOptional

Create the class even if the controller already exists

invokableOptional

Generate a single method, invokable controller class.

modelOptional

Generate a resource controller for the given model.

parentOptional

Generate a nested resource controller class.

resourceOptional

Generate a resource controller class.

Arguments

nameRequired

The name of the class