ControllerGenerator
class ControllerGenerator (View source)
Properties
protected Filesystem | $files | The filesystem instance. |
|
protected array | $defaults | The default resource controller methods. |
Methods
Create a new resourceful controller file.
Write the completed stub to disk.
Create the directory for the controller.
Get the directory the controller should live in.
Get the controller class stub.
Replace the namespace on the controller.
Add the method stubs to the controller.
Get all of the method stubs for the given 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.