GeneratorCommand
Extends
Properties
$type string
The type of class being generated.
$reservedNames string[]
Reserved names that cannot be used for generation.
Methods
__construct ( Filesystem $files ) : void
Create a new controller creator command instance.
Parameters
- $files Filesystem
getStub ( ) : string
Get the stub file for the generator.
handle ( ) : bool|null
Execute the console command.
qualifyClass ( $name ) : string
Parse the class name and format according to the root namespace.
Parameters
- $name string
qualifyModel ( string $model ) : string
Qualify the given model class base name.
Parameters
- $model string
getDefaultNamespace ( $rootNamespace ) : string
Get the default namespace for the class.
Parameters
- $rootNamespace string
alreadyExists ( $rawName ) : bool
Determine if the class already exists.
Parameters
- $rawName string
getPath ( $name ) : string
Get the destination class path.
Parameters
- $name string
makeDirectory ( $path ) : string
Build the directory for the class if necessary.
Parameters
- $path string
buildClass ( $name ) : string
Build the class with the given name.
Parameters
- $name string
replaceNamespace ( $stub , $name ) : $this
Replace the namespace for the given stub.
Parameters
- $stub string
- $name string
getNamespace ( $name ) : string
Get the full namespace for a given class, without the class name.
Parameters
- $name string
replaceClass ( $stub , $name ) : string
Replace the class name for the given stub.
Parameters
- $stub string
- $name string
sortImports ( $stub ) : string
Alphabetically sorts the imports for the given stub.
Parameters
- $stub string
getNameInput ( ) : string
Get the desired class name from the input.
rootNamespace ( ) : string
Get the root namespace for the class.
userProviderModel ( ) : string|null
Get the model for the default guard's user provider.
isReservedName ( $name ) : bool
Checks whether the given name is reserved.
Parameters
- $name string
viewPath ( $path ) : string
Get the first view directory path from the application configuration.
Parameters
- $path string
getArguments ( ) : array
Get the console command arguments.