logic = (new SysDictLogic()); } /** * 获取系统list */ public function getList() { return $this->logic->getList(); } public static function pluckValuesByCode(string $dictCode): \Illuminate\Support\Collection { return SysDict::where('dict_code', $dictCode) ->where('status', 1) ->first()?->items() ->where('status', 1) ->orderBy('sort') ->pluck('item_value') ?? collect(); } public static function pluckKeyValueByCode(string $dictCode): \Illuminate\Support\Collection { return SysDict::where('dict_code', $dictCode) ->where('status', 1) ->first()?->items() ->where('status', 1) ->orderBy('sort') ->pluck('item_value', 'item_label') ?? collect(); } }