Closed Lin07ux closed 5 years ago
This is currently not implemented in Lumen but you can send in a PR if you want.
Here's the Laravel implementation: https://github.com/laravel/framework/blob/ffdc4e590f1a45190984a9770051281b7ee28d8d/src/Illuminate/Database/DatabaseServiceProvider.php#L77-L79
Description:
The
faker_locale
option inconfig/app.php
is not working when i usefactory()
method to generate data in Lumen 5.8 or 6.2.Steps To Reproduce:
Firt, I set the
faker_locale
option inconfig/app.php
:Then, I define a factory like this:
I used this factory in a seeder. When I run the seeder, I got a Subject whose name attribute is in English, eg.
Alexane Hirthe
, not the Chinese name I excepted.However, when I modify part code in the
Illuminate\Database\DatabaseServiceProvider::registerEloquentFactory()
, I get the correct result: