krlove / eloquent-model-generator

Eloquent Model Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Package does't override model defaults config Lumen

ismatBabirli opened this issue · 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?

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

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

It's work for me

I do that but not working

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.