From 59d3b753a3b38a85fbfbe9b9f3ea870d9b6549bb Mon Sep 17 00:00:00 2001 From: Karel FAILLE Date: Fri, 6 Nov 2020 15:51:24 +0100 Subject: [PATCH] Leverage Laravel's Faker singleton & config --- src/BaseFactory.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BaseFactory.php b/src/BaseFactory.php index 068259a..77df657 100644 --- a/src/BaseFactory.php +++ b/src/BaseFactory.php @@ -2,7 +2,6 @@ namespace Christophrumpel\LaravelFactoriesReloaded; -use Faker\Factory as FakerFactory; use Faker\Generator; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Collection; @@ -30,7 +29,7 @@ public function __construct(Generator $faker) /** @return static */ public static function new(): self { - $faker = FakerFactory::create(config('app.faker_locale', 'en_US')); + $faker = app(Generator::class); return new static($faker); }