|
@@ -160,18 +160,7 @@ class NewsService implements NewsServiceInterface
|
|
array_push($where,['article.status','=',$data['status']]);
|
|
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)
|
|
$rep = Article::where($where)
|
|
->whereNotIn('status',[404])
|
|
->whereNotIn('status',[404])
|
|
->leftJoin('category','article.catid','category.id')
|
|
->leftJoin('category','article.catid','category.id')
|