mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Use getSettings() to check for locale to take advantage of cached value
This commit is contained in:
parent
ba23952852
commit
16a24b7fb8
|
@ -21,7 +21,9 @@ class CheckLocale
|
|||
|
||||
public function handle($request, Closure $next, $guard = null)
|
||||
{
|
||||
if (Schema::hasTable('settings')) {
|
||||
|
||||
|
||||
if (Setting::getSettings()) {
|
||||
// User's preference
|
||||
if (($request->user()) && ($request->user()->locale)) {
|
||||
\App::setLocale($request->user()->locale);
|
||||
|
|
Loading…
Reference in a new issue