Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 991
Zeile 41... Zeile 41...
41
     * @param  string|null  $locale
41
     * @param  string|null  $locale
42
     * @return \Faker\Generator
42
     * @return \Faker\Generator
43
     */
43
     */
44
    protected function makeFaker($locale = null)
44
    protected function makeFaker($locale = null)
45
    {
45
    {
-
 
46
        if (isset($this->app)) {
46
        $locale ??= config('app.faker_locale', Factory::DEFAULT_LOCALE);
47
            $locale ??= $this->app->make('config')->get('app.faker_locale', Factory::DEFAULT_LOCALE);
Zeile 47... Zeile 48...
47
 
48
 
48
        if (isset($this->app) && $this->app->bound(Generator::class)) {
49
            if ($this->app->bound(Generator::class)) {
-
 
50
                return $this->app->make(Generator::class, ['locale' => $locale]);
49
            return $this->app->make(Generator::class, ['locale' => $locale]);
51
            }
Zeile 50... Zeile 52...
50
        }
52
        }
51
 
53
 
52
        return Factory::create($locale);
54
        return Factory::create($locale ?? Factory::DEFAULT_LOCALE);