|
@@ -15,9 +15,12 @@ class ConfigCityManagementRepository
|
|
|
public function index($request)
|
|
|
{
|
|
|
$perPage = isset($request['per_page']) ? $request['per_page'] : env('PER_PAGE');
|
|
|
- $this->configCityManagement = $this->configCityManagement
|
|
|
+ if (isset($request['city_id'])) {
|
|
|
+
|
|
|
+ $this->configCityManagement = $this->configCityManagement
|
|
|
->orderBy('id', 'desc')
|
|
|
- ->where('status',0);
|
|
|
+ ->where(['status' => 0,'city_id' => $request['city_id']]);
|
|
|
+ }
|
|
|
|
|
|
return $this->configCityManagement->paginate($perPage);
|
|
|
|