diff --git a/src/Models/PostScope.php b/src/Models/PostScope.php index 3731e49..be73263 100644 --- a/src/Models/PostScope.php +++ b/src/Models/PostScope.php @@ -69,7 +69,7 @@ public function scopeSearch($query, $term) } return $query->where(function ($query) use ($term) { - foreach (['title', 'content', 'description'] as $attribute) { + foreach (['title', 'slug', 'content', 'description'] as $attribute) { $query->orWhere(DB::raw("lower($attribute)"), 'like', "%$term%"); }