artisan.eplus.dev

make:controller

Create a new controller class

Terminal
php artisan make:controller [--api] [--type TYPE] [--force] [-i|--invokable] [-m|--model [MODEL]] [-p|--parent [PARENT]] [-r|--resource] [-R|--requests] [--test] [--pest] [--] <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.

pestOptional

Generate an accompanying Pest test for the Controller

requestsOptional

Generate FormRequest classes for store and update.

resourceOptional

Generate a resource controller class.

testOptional

Generate an accompanying PHPUnit test for the Controller

typeRequired

Manually specify the controller stub file to use.

Arguments

nameRequired

The name of the class

Maintained by hoangsvit · Fork of artisan.page