wesmiler 2 месяцев назад
Родитель
Сommit
a2cd050d55
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/Services/Common/ArticleService.php

+ 1 - 1
app/Services/Common/ArticleService.php

@@ -72,7 +72,7 @@ class ArticleService extends BaseService
             ->where(function ($query) use ($type) {
             ->where(function ($query) use ($type) {
                 if ($type>0) {
                 if ($type>0) {
                     $query->where('a.type', $type);
                     $query->where('a.type', $type);
-                }if ($type<0) {
+                } else if ($type<0) {
                     $query->whereIn('a.type', [1,2]);
                     $query->whereIn('a.type', [1,2]);
                 } else {
                 } else {
                     $query->where('a.type','>=',3)->where('a.type','<',9);
                     $query->where('a.type','>=',3)->where('a.type','<',9);