oxbir
1 week ago
135
10
Laravel

Call to undefined method Illuminate\Foundation\Application::getLocal()

Posted 1 week ago by oxbir

Look at my codes

app.php

'locale' => 'fa',
'locales' => ['fa' => 'Farsi', 'en' => 'English'],
'locals' => ['fa', 'en'],

controller file

Style::create([
    'lang' => app()->getLocal(),
//...

I get this error

Call to undefined method Illuminate\Foundation\Application::getLocal()

Please sign in or create an account to participate in this conversation.