LiuJ 2 روز پیش
والد
کامیت
393cf245f9
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      app/JsonRpc/NewsService.php

+ 4 - 0
app/JsonRpc/NewsService.php

@@ -354,6 +354,10 @@ class NewsService implements NewsServiceInterface
     if (isset($data['id'])) {
       $whereArticle['id'] = $data['id'];
     }
+    //title  like
+    if (isset($data['title'])) {
+      array_push($whereArticle, ['title', 'like', "%{$data['title']}%"]);
+    }
     $article = Article::whereIn('catid', values: $ids)->where('status', 1)
       ->where($whereArticle)
       ->orderBy('id', 'desc')