@@ -78,7 +78,11 @@ class ModelsCommand extends Command
78
78
* @var string
79
79
*/
80
80
protected $ name = 'ide-helper:models ' ;
81
- protected $ filename = '_ide_helper_models.php ' ;
81
+
82
+ /**
83
+ * @var string
84
+ */
85
+ protected $ filename ;
82
86
83
87
/**
84
88
* The console command description.
@@ -131,7 +135,8 @@ public function __construct(Filesystem $files)
131
135
*/
132
136
public function handle ()
133
137
{
134
- $ filename = $ this ->option ('filename ' );
138
+ $ this ->filename = $ this ->laravel ['config ' ]->get ('ide-helper.models_filename ' , '_ide_helper_models.php ' );
139
+ $ filename = $ this ->option ('filename ' ) ?? $ this ->filename ;
135
140
$ this ->write = $ this ->option ('write ' );
136
141
$ this ->write_mixin = $ this ->option ('write-mixin ' );
137
142
$ this ->dirs = array_merge (
@@ -199,7 +204,7 @@ protected function getArguments()
199
204
protected function getOptions ()
200
205
{
201
206
return [
202
- ['filename ' , 'F ' , InputOption::VALUE_OPTIONAL , 'The path to the helper file ' , $ this -> filename ],
207
+ ['filename ' , 'F ' , InputOption::VALUE_OPTIONAL , 'The path to the helper file ' ],
203
208
['dir ' , 'D ' , InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY ,
204
209
'The model dir, supports glob patterns ' , [], ],
205
210
['write ' , 'W ' , InputOption::VALUE_NONE , 'Write to Model file ' ],
0 commit comments