Use getSettings() to check for locale to take advantage of cached value

This commit is contained in:
snipe 2016-11-29 00:21:58 -08:00
parent ba23952852
commit 16a24b7fb8

View file

@ -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);