'boolean', ]; /** * Equivalent of CI getActiveTemplates(): * is_active=1, orderBy template_key ASC */ public static function getActiveTemplates() { return static::query() ->where('is_active', 1) ->orderBy('template_key', 'asc') ->get(); } /** * Equivalent of CI findByKey(): * template_key = $key AND is_active=1 */ public static function findByKey(string $key): ?self { return static::query() ->where('template_key', $key) ->where('is_active', 1) ->first(); } }