From 16a24b7fb82c5b36455da0d9a934421b83115cf1 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 29 Nov 2016 00:21:58 -0800 Subject: [PATCH] Use getSettings() to check for locale to take advantage of cached value --- app/Http/Middleware/CheckLocale.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Middleware/CheckLocale.php b/app/Http/Middleware/CheckLocale.php index 4a5cac05ae..2f925e3a0b 100644 --- a/app/Http/Middleware/CheckLocale.php +++ b/app/Http/Middleware/CheckLocale.php @@ -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);