class ModelMakeCommand extends GeneratorCommand

Properties

protected string $name The console command name.
protected string $description The console command description.
protected string $type The type of class being generated.

Methods

string
rootNamespace()

Get the root namespace for the class.

string
getPath(string $name)

Get the destination class path.

void
handle()

Execute the console command.

void
createController()

Create a controller for the model.

string
getStub()

Get the stub file for the generator.

replaceRelationId($stub, $relationId)

No description

string
buildClass(string $name)

Build the class with the given name.

array
getOptions()

Get the console command options.

Details

at line 41
protected string rootNamespace()

Get the root namespace for the class.

Return Value

string

at line 52
protected string getPath(string $name)

Get the destination class path.

Parameters

string $name

Return Value

string

at line 64
void handle()

Execute the console command.

Return Value

void

at line 105
protected void createController()

Create a controller for the model.

Return Value

void

at line 123
protected string getStub()

Get the stub file for the generator.

Return Value

string

at line 128
protected replaceRelationId($stub, $relationId)

Parameters

$stub
$relationId

at line 147
protected string buildClass(string $name)

Build the class with the given name.

Parameters

string $name

Return Value

string

Exceptions

FileNotFoundException

at line 161
protected array getOptions()

Get the console command options.

Return Value

array