Property | Type | Description | |
---|---|---|---|
$databaseEngine | string | ||
$description | string | The console command description. | |
$extends | string | Default class the model extends. | |
$fillableRules | array | Rules for columns that go into the fillable list. | |
$getFunctionStub | string | Contains the template stub for get function | |
$guardedRules | array | Rules for columns that go into the guarded list. | |
$name | string | The console command name. | |
$namespace | string | Default model namespace. | |
$ruleProcessor | Rule processor class instance. | ||
$setFunctionStub | string | Contains the template stub for set function | |
$timestampRules | array | Rules for columns that set whether the timestamps property is set to true/false. |
Method | Description | |
---|---|---|
fire ( ) : mixed | Execute the console command. | |
getStub ( ) : string | Get stub file location. |
Method | Description | |
---|---|---|
generateTable ( $table ) : void | Generate a model file from a database table. | |
getArguments ( ) : array | Get the console command arguments. | |
getOptions ( ) : array | Get the console command options. | |
getSchemaTables ( ) : array | Get schema tables. | |
getTableColumns ( $table ) : array | Get table columns. | |
getTablePrimaryKey ( $table ) : string | Get table primary key column. | |
getTableProperties ( $table ) : array | Fill up $fillable/$guarded/$timestamps properties based on table columns. | |
replaceTokens ( $name, $table ) : mixed | string | Replace all stub tokens with properties. | |
replaceTokensWithSetGetFunctions ( array $properties, string $class ) : string | Replaces setters and getters from the stub. The functions are created from provider properties. |
protected generateTable ( $table ) : void | ||
$table | ||
return | void |
protected getArguments ( ) : array | ||
return | array |
protected getOptions ( ) : array | ||
return | array |
protected getSchemaTables ( ) : array | ||
return | array |
protected getTableColumns ( $table ) : array | ||
$table | ||
return | array |
protected getTablePrimaryKey ( $table ) : string | ||
$table | ||
return | string |
protected getTableProperties ( $table ) : array | ||
$table | ||
return | array |
protected replaceTokens ( $name, $table ) : mixed | string | ||
$name | ||
$table | ||
return | mixed | string |
protected string $description | ||
return | string |
protected string $extends | ||
return | string |
protected array $fillableRules | ||
return | array |
protected string $getFunctionStub | ||
return | string |
protected array $guardedRules | ||
return | array |
protected string $setFunctionStub | ||
return | string |
protected array $timestampRules | ||
return | array |