1
0
Эх сурвалжийг харах

Update CustomFilterKeyword model, add setKeywordAttribute method

Daniel Supernault 3 сар өмнө
parent
commit
578718c606

+ 5 - 0
app/Models/CustomFilterKeyword.php

@@ -19,6 +19,11 @@ class CustomFilterKeyword extends Model
         return $this->belongsTo(CustomFilter::class);
     }
 
+    public function setKeywordAttribute($value)
+    {
+        $this->attributes['keyword'] = mb_strtolower(trim($value));
+    }
+
     public function toRegex()
     {
         $pattern = preg_quote($this->keyword, '/');