ControllerGenerator
class ControllerGenerator (View source)
Properties
protected Filesystem | $files | The filesystem instance. | |
protected array | $defaults | The default resource controller methods. |
Methods
void | __construct(Filesystem $files) Create a new controller generator instance. | |
void | make(string $controller, string $path, array $options = array()) Create a new resourceful controller file. | |
void | writeFile(string $stub, string $controller, string $path) Write the completed stub to disk. | |
void | makeDirectory(string $controller, string $path) Create the directory for the controller. | |
string | getDirectory(string $controller) Get the directory the controller should live in. | |
string | getController(string $controller) Get the controller class stub. | |
string | replaceNamespace(array $segments, string $stub) Replace the namespace on the controller. | |
string | addMethods(string $stub, array $options) Add the method stubs to the controller. | |
array | getMethodStubs(array $options) Get all of the method stubs for the given options. | |
array | getMethods(array $options) Get the applicable methods based on the options. |
Details
void __construct(Filesystem $files)
Create a new controller generator instance.
void make(string $controller, string $path, array $options = array())
Create a new resourceful controller file.
protected void writeFile(string $stub, string $controller, string $path)
Write the completed stub to disk.
protected void makeDirectory(string $controller, string $path)
Create the directory for the controller.
protected string getDirectory(string $controller)
Get the directory the controller should live in.
protected string getController(string $controller)
Get the controller class stub.
protected string replaceNamespace(array $segments, string $stub)
Replace the namespace on the controller.
protected string addMethods(string $stub, array $options)
Add the method stubs to the controller.
protected array getMethodStubs(array $options)
Get all of the method stubs for the given options.
protected array getMethods(array $options)
Get the applicable methods based on the options.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.5/Illuminate/Routing/Generators/ControllerGenerator.html