Skip to content

Commit

Permalink
allow fake() helper without config bound (#45624)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgaal authored Jan 13, 2023
1 parent 9277100 commit 4079aa9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Foundation/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4079aa9

Please sign in to comment.