From ac57eb9447767ce91a26a8e3d513f84bab7cd981 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Thu, 25 Jul 2024 03:52:24 +0330 Subject: [PATCH] added icon field to setting --- app/Models/Setting.php | 9 +++++---- resources/views/components/setting-field.blade.php | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Models/Setting.php b/app/Models/Setting.php index b15f6ba..03c9bcb 100644 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -12,10 +12,11 @@ class Setting extends Model public $translatable = ['value']; - public static $settingTypes = ['TEXT','NUMBER', 'LONGTEXT', 'CODE', 'EDITOR', - 'CATEGORY', 'GROUP', 'CHECKBOX', 'FILE', 'COLOR','SELECT','MENU']; + public static $settingTypes = ['TEXT', 'NUMBER', 'LONGTEXT', 'CODE', 'EDITOR', + 'CATEGORY', 'GROUP', 'CHECKBOX', 'FILE', 'COLOR', 'SELECT', 'MENU', 'LOCATION', 'ICON']; - public function getData(){ - return json_decode($this->data,true); + public function getData() + { + return json_decode($this->data, true); } } diff --git a/resources/views/components/setting-field.blade.php b/resources/views/components/setting-field.blade.php index 8f0f69f..4e67bac 100644 --- a/resources/views/components/setting-field.blade.php +++ b/resources/views/components/setting-field.blade.php @@ -16,6 +16,9 @@ class="form-control" rows="5">{{old($setting->key, $setting->value)}} @break + @case('ICON') + + @break @case('EDITOR')