Parcourir la source

自定义规则增加key搜索

kely il y a 11 mois
Parent
commit
3fb91fa2f5
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      app/ModelFilters/CustomFieldFilter.php

+ 4 - 0
app/ModelFilters/CustomFieldFilter.php

@@ -19,6 +19,10 @@ class CustomFieldFilter extends ModelFilter
         return $this->where("group", $group);
     }
 
+    public function key($key){
+        return $this->where("key", "like", "%$key%");
+    }
+
     public function batch($batch)
     {
         $in = [];