'boolean', ]; /** * @return array */ public static function activeOptions(string $dictType): array { return static::query() ->where('dict_type', $dictType) ->where('is_active', true) ->orderBy('sort') ->orderBy('id') ->get(['item_value', 'item_label']) ->map(fn ($r) => [ 'value' => (string) $r->item_value, 'label' => (string) $r->item_label, ]) ->values() ->all(); } }