Explorar o código

添加根据使用后台的筛选

duqinya %!s(int64=5) %!d(string=hai) anos
pai
achega
6d0415c1ce
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      app/Repositories/BannerRepository.php

+ 4 - 0
app/Repositories/BannerRepository.php

@@ -33,6 +33,10 @@ class BannerRepository
             $where[] = ['name', 'like', "%{$request['name']}%"];
         }
 
+        if (isset($request['use_background'])){
+            $where[] = ['use_background', '=', $request['use_background']];
+        }
+
         return $this->banner->where($where)->orderBy('id', 'desc')->paginate($perPage);
 
     }