Skip to content

Commit f089949

Browse files
committed
Add an option to specify the default path to the models directory
1 parent a0ce238 commit f089949

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Illuminate/Database/Console/PruneCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ class PruneCommand extends Command
2323
{--model=* : Class names of the models to be pruned}
2424
{--except=* : Class names of the models to be excluded from pruning}
2525
{--chunk=1000 : The number of models to retrieve per chunk of models to be deleted}
26-
{--pretend : Display the number of prunable records found instead of deleting them}';
26+
{--pretend : Display the number of prunable records found instead of deleting them}
27+
{--default-path=Models : The default path where models are located}';
2728

2829
/**
2930
* The console command description.
@@ -121,7 +122,7 @@ protected function models()
121122
*/
122123
protected function getDefaultPath()
123124
{
124-
return app_path('Models');
125+
return app_path($this->option('default-path'));
125126
}
126127

127128
/**

0 commit comments

Comments
 (0)