|
@@ -141,6 +141,7 @@ class NewsService implements NewsServiceInterface
|
|
public function getArticleList(array $data): array
|
|
public function getArticleList(array $data): array
|
|
{
|
|
{
|
|
$where= [];
|
|
$where= [];
|
|
|
|
+
|
|
if(isset($data['title']) && $data['title']){
|
|
if(isset($data['title']) && $data['title']){
|
|
array_push($where,['article.title','like','%'.$data['title'].'%']);
|
|
array_push($where,['article.title','like','%'.$data['title'].'%']);
|
|
}
|
|
}
|
|
@@ -156,6 +157,7 @@ class NewsService implements NewsServiceInterface
|
|
if(isset($data['status']) && $data['status']){
|
|
if(isset($data['status']) && $data['status']){
|
|
array_push($where,['article.status','=',$data['status']]);
|
|
array_push($where,['article.status','=',$data['status']]);
|
|
}
|
|
}
|
|
|
|
+
|
|
$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')
|