From 7867c7b3ca71bbc0f26fa0f4cb95839bbf9958c5 Mon Sep 17 00:00:00 2001 From: KodeStar Date: Mon, 5 Feb 2018 17:06:52 +0000 Subject: [PATCH] Fix each bar provider not set breaking page --- app/Setting.php | 9 +++++++++ public/mix-manifest.json | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/Setting.php b/app/Setting.php index c3b580df..d734f6ef 100644 --- a/app/Setting.php +++ b/app/Setting.php @@ -168,6 +168,15 @@ class Setting extends Model $output = ''; $homepage_search = self::fetch('homepage_search'); $search_provider = self::where('key', '=', 'search_provider')->first(); + + //die(var_dump($search_provider->value)); + // return early if search isn't applicable + if((bool)$homepage_search !== true) return $output; + if($search_provider->value === 'none') return $output; + if(empty($search_provider->value)) return $output; + if(is_null($search_provider->value)) return $output; + + if((bool)$homepage_search && (bool)$search_provider) { $options = (array)json_decode($search_provider->options); diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 2149eb01..8e2099a7 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { - "/css/app.css": "/css/app.css?id=93569633795ce0c63222", - "/js/app.js": "/js/app.js?id=9cbe042c4b6921658a84" + "/css/app.css": "/css/app.css?id=0fffc4ebd1580fd60924", + "/js/app.js": "/js/app.js?id=2dffa24cf7255229e085" } \ No newline at end of file