Fixes for locale middleware
This commit is contained in:
parent
88c6fc6d4c
commit
bee623af75
1 changed files with 7 additions and 1 deletions
|
|
@ -35,7 +35,13 @@ class Locale
|
|||
} elseif (auth('contact')->user()) {
|
||||
App::setLocale(auth('contact')->user()->client->locale());
|
||||
} elseif (auth()->user()) {
|
||||
App::setLocale(auth()->user()->company()->getLocale());
|
||||
|
||||
try{
|
||||
App::setLocale(auth()->user()->company()->getLocale());
|
||||
}
|
||||
catch(\Exception $e){
|
||||
}
|
||||
|
||||
} else {
|
||||
App::setLocale(config('ninja.i18n.locale'));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue