Artisan.page

model:prune

Prune models that are no longer needed

Terminal
php artisan model:prune [--model [MODEL]] [--except [EXCEPT]] [--chunk [CHUNK]] [--pretend]

Options

chunkOptional

The number of models to retrieve per chunk of models to be deleted

exceptOptional

Class names of the models to be excluded from pruning

modelOptional

Class names of the models to be pruned

pretendOptional

Display the number of prunable records found instead of deleting them