eloquent-model-generator icon indicating copy to clipboard operation
eloquent-model-generator copied to clipboard

Package does't override model defaults config Lumen

Open ismatBabirli opened this issue 5 years ago • 4 comments

I create file name as eloquent_model_generator.php and add this code in file ` return [ 'model_defaults' => [ 'namespace' => 'App\Models', 'base_class_name' => \Illuminate\Database\Eloquent\Model::class, 'output_path' => "Models", 'no_timestamps' => null, 'date_format' => null, 'connection' => null, 'backup' => null, ], ];

` after this config my model must be create in Models folder but it is not. It is created in app directory. What is wrong in this case?

ismatBabirli avatar Jan 31 '20 13:01 ismatBabirli

I also added config to app.php file $app->configure("eloquent_model_generator.php");

ismatBabirli avatar Jan 31 '20 13:01 ismatBabirli

please create eloquent_model_generator.php file inside config folder and run php artisan optimize

It's work for me

rojsiroj avatar Feb 17 '20 08:02 rojsiroj

I do that but not working

ismatBabirli avatar Feb 26 '20 16:02 ismatBabirli

I found a solution problem is config repository. in package get config file as this return new Config($config, $this->appConfig->get('eloquent_model_generator.model_defaults')); but if I change this code to return new Config($config, \config('eloquent_model_generator.model_defaults')); this is work. Please update this part of code for solving problem.

ismatBabirli avatar Feb 26 '20 16:02 ismatBabirli