diff --git a/app/Models/Setting.php b/app/Models/Setting.php index 4b849ec..6879866 100644 --- a/app/Models/Setting.php +++ b/app/Models/Setting.php @@ -14,7 +14,7 @@ class Setting extends Model public static $settingTypes = ['TEXT', 'NUMBER', 'LONGTEXT', 'CODE', 'EDITOR', 'CATEGORY', 'GROUP', 'CHECKBOX', 'FILE', 'COLOR', 'SELECT', 'MENU', 'LOCATION', - 'ICON','DATE','DATETIME','TIME','PRODUCT_QUERY','POST_QUERY']; + 'ICON','DATE','DATETIME','TIME','PRODUCT_QUERY','POST_QUERY','CATEGORY_SET']; public function getData() { diff --git a/resources/views/components/setting-field.blade.php b/resources/views/components/setting-field.blade.php index f849cc3..51b1db4 100644 --- a/resources/views/components/setting-field.blade.php +++ b/resources/views/components/setting-field.blade.php @@ -82,6 +82,19 @@ xvalue='{{old($setting->key,$setting->value??null)}}' :close-on-Select="true"> @break + @case('CATEGORY_SET') + key) :err="true" @enderror + :items='@json($cats)' + title-field="name" + value-field="id" + xlang="{{config('app.locale')}}" + xid="{{$setting->key}}" + xname="{{$setting->key}}" + @error('category_id') :err="true" @enderror + :xvalue='{{old($setting->key,$setting->value??[])}}' + :close-on-Select="true"> + @break @case('GROUP') key) :err="true" @enderror