diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php index 9a61616d919f..4b017433fe21 100644 --- a/src/Illuminate/Foundation/helpers.php +++ b/src/Illuminate/Foundation/helpers.php @@ -461,7 +461,11 @@ function event(...$args) */ function fake($locale = null) { - $locale ??= app('config')->get('app.faker_locale') ?? 'en_US'; + if (app()->bound('config')) { + $locale ??= app('config')->get('app.faker_locale'); + } + + $locale ??= 'en_US'; $abstract = \Faker\Generator::class.':'.$locale;