|
@@ -16,18 +16,18 @@ class CmsContentTemplateRepository {
|
|
|
{
|
|
|
$perPage = isset($request['per_page']) ? $request['per_page'] : env('PER_PAGE');
|
|
|
$where = [];
|
|
|
- if (isset($request['is_open'])){
|
|
|
- $where[] = ['is_open','=',$request['is_open']];
|
|
|
- return $this->cmsContentTemplate->where($where)->orderBy('id', 'asc')->paginate($perPage);
|
|
|
-
|
|
|
- }
|
|
|
+// if (isset($request['is_open'])){
|
|
|
+// $where[] = ['is_open','=',$request['is_open']];
|
|
|
+// return $this->cmsContentTemplate->where($where)->orderBy('id', 'asc')->paginate($perPage);
|
|
|
+//
|
|
|
+// }
|
|
|
if (isset($request['city_id'])){
|
|
|
$where[] = [
|
|
|
'city_id','=',$request['city_id'],
|
|
|
];
|
|
|
- return $this->cmsContentTemplate->where($where)->where('is_open','=',1)->orderBy('id', 'asc')->paginate($perPage);
|
|
|
|
|
|
}
|
|
|
+ return $this->cmsContentTemplate->where($where)->where('is_open','=',1)->orderBy('id', 'asc')->paginate($perPage);
|
|
|
|
|
|
|
|
|
}
|