ShowModelCommand
Extends
Properties
$name string
The console command name.
$description string
The console command description.
$signature string
The console command signature.
$relationMethods array
The methods that can be called in a model to indicate a relation.
Methods
handle ( ) : int
Execute the console command.
getPolicy ( $model ) : string
Get the first policy associated with this model.
Parameters
- $model Model
getAttributes ( $model ) : Illuminate\...\Collection
Get the column attributes for the given model.
Parameters
- $model Model
getVirtualAttributes ( $model , $columns ) : Illuminate\...\Collection
Get the virtual (non-column) attributes for the given model.
Parameters
- $model Model
- $columns Doctrine\...\Column[]
getRelations ( $model ) : Illuminate\...\Collection
Get the relations from the given model.
Parameters
- $model Model
getObservers ( $model ) : Illuminate\...\Collection
Get the Observers watching this model.
Parameters
- $model Model
display ( $class , $database , $table , $policy , $attributes , $relations , $observers ) : void
Render the model information.
Parameters
- $class string
- $database string
- $table string
- $policy string
- $attributes Illuminate\...\Collection
- $relations Illuminate\...\Collection
- $observers Illuminate\...\Collection
displayJson ( $class , $database , $table , $policy , $attributes , $relations , $observers ) : void
Render the model information as JSON.
Parameters
- $class string
- $database string
- $table string
- $policy string
- $attributes Illuminate\...\Collection
- $relations Illuminate\...\Collection
- $observers Illuminate\...\Collection
displayCli ( $class , $database , $table , $policy , $attributes , $relations , $observers ) : void
Render the model information for the CLI.
Parameters
- $class string
- $database string
- $table string
- $policy string
- $attributes Illuminate\...\Collection
- $relations Illuminate\...\Collection
- $observers Illuminate\...\Collection
getCastType ( $column , $model ) : string|null
Get the cast type for the given column.
Parameters
- $column string
- $model Model
getCastsWithDates ( $model ) : Illuminate\...\Collection
Get the model casts, including any date casts.
Parameters
- $model Model
getColumnType ( $column ) : string
Get the type of the given column.
Parameters
- $column Doctrine\...\Column
getColumnDefault ( $column , $model ) : mixed|null
Get the default value for the given column.
Parameters
- $column Doctrine\...\Column
- $model Model
attributeIsHidden ( $attribute , $model ) : bool
Determine if the given attribute is hidden.
Parameters
- $attribute string
- $model Model
columnIsUnique ( $column , $indexes ) : bool
Determine if the given attribute is unique.
Parameters
- $column string
- $indexes Doctrine\...\Index[]
qualifyModel ( string $model ) : string
Qualify the given model class base name.
Parameters
- $model string
See
- \Illuminate\Console\GeneratorCommand