rkljw 5 mesiacov pred
rodič
commit
a0bf359685
1 zmenil súbory, kde vykonal 1 pridanie a 12 odobranie
  1. 1 12
      app/JsonRpc/NewsService.php

+ 1 - 12
app/JsonRpc/NewsService.php

@@ -160,18 +160,7 @@ class NewsService implements NewsServiceInterface
             array_push($where,['article.status','=',$data['status']]);
 
         }
-        if(isset($data['catid'])){
-            $where[] =   ['article.catid',$data['catid']];
-            $where[] =   ['article.status', '1'];
-        }elseif(isset($data['keyword'])){
-            $where[] =   ['article.title','like','%'.$data['keyword'].'%'];
-            $where[] =   ['article.status', '1'];
-        }else{
-            $where[] =   ['article.catid',$data['catid']];
-            $where[] =   ['article.title','like','%'.$data['keyword'].'%'];
-            $where[] =   ['article.status', '1'];
-        }
-        
+
         $rep = Article::where($where)
             ->whereNotIn('status',[404])
             ->leftJoin('category','article.catid','category.id')