Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.

ControllerMakeCommand

Ferdinand Frank edited this page Aug 12, 2018 · 2 revisions

Creates a new controller class.

Usage

php artisan make:controller [options] [--] <name>

Arguments

Argument Description Note
name The name of the controller Required

Options

Option Description Default
-m, --model[=MODEL] Generate a resource controller for the given model
-r, --resource Generate a resource controller class
--implement[=IMPLEMENT] Generate an implemented controller for the given model
-h, --help Display a help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages

Stubs

This table gives you an overview when which stub file is used as a template to create the php file.

Stub Command Restriction
controller.implement.stub Used when option -i, --implement[=IMPLEMENT] is provided
controller.model.stub Used when option -m, --model[=MODEL] is provided
controller.stub Used when option -r, --resource is provided
controller.plain.stub Used when none of the above options is provided
Clone this wiki locally