mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for locale middleware
This commit is contained in:
parent
88c6fc6d4c
commit
bee623af75
@ -35,7 +35,13 @@ class Locale
|
|||||||
} elseif (auth('contact')->user()) {
|
} elseif (auth('contact')->user()) {
|
||||||
App::setLocale(auth('contact')->user()->client->locale());
|
App::setLocale(auth('contact')->user()->client->locale());
|
||||||
} elseif (auth()->user()) {
|
} elseif (auth()->user()) {
|
||||||
|
|
||||||
|
try{
|
||||||
App::setLocale(auth()->user()->company()->getLocale());
|
App::setLocale(auth()->user()->company()->getLocale());
|
||||||
|
}
|
||||||
|
catch(\Exception $e){
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
App::setLocale(config('ninja.i18n.locale'));
|
App::setLocale(config('ninja.i18n.locale'));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user