class
Illuminate
/
Database
/
Console
/
PruneCommand
PruneCommand
Extends
Properties
protected
$signature string
The console command name.
Default: 'model:prune
{--model=* : Class names of the models to be pruned}
{--except=* : Class names of the models to be excluded from pruning}
{--chunk=1000 : The number of models to retrieve per chunk of models to be deleted}
{--pretend : Display the number of prunable records found instead of deleting them}'
protected
$description string
The console command description.
Default: 'Prune models that are no longer needed'
Methods
public
handle ( Dispatcher $events ) : void
Execute the console command.
Parameters
- $events Dispatcher
protected
pruneModel ( string $model ) : void
Prune the given model.
Parameters
- $model string
protected
models ( ) : Illuminate\...\Collection
Determine the models that should be pruned.
protected
getDefaultPath ( ) : string|string[]
Get the default path where models are located.
protected
isPrunable ( $model ) : bool
Determine if the given model class is prunable.
Parameters
- $model string
protected
pretendToPrune ( $model ) : void
Display how many models will be pruned.
Parameters
- $model string