diff --git a/app/console/controller/BrandController.php b/app/console/controller/BrandController.php index ab88108..1637be1 100644 --- a/app/console/controller/BrandController.php +++ b/app/console/controller/BrandController.php @@ -113,7 +113,7 @@ class BrandController extends BaseController $params['filters'][] = ['field' => 'status', 'operator' => '=', 'value' => $params['status']]; } if(!empty($params['name'])){ - $id = BrandTranslationModel::where('name', 'like', '%'.$params['name'].'%')->pluck('id')->toArray(); + $id = BrandTranslationModel::where('name', 'like', '%'.$params['name'].'%')->pluck('brand_id')->toArray(); $params['filters'][] = ['field' => 'id', 'operator' => 'in', 'value' => $id]; } } diff --git a/app/console/controller/VehicleNewController.php b/app/console/controller/VehicleNewController.php index 0156f8a..c46ae08 100644 --- a/app/console/controller/VehicleNewController.php +++ b/app/console/controller/VehicleNewController.php @@ -132,7 +132,7 @@ class VehicleNewController extends BaseController $params['filters'][] = ['field' => 'energy', 'operator' => '=', 'value' => $params['energy']]; } if(!empty($params['name_like'])){ - $id = VehicleNewTranslationModel::where('name', 'like', '%'.$params['name_like'].'%')->pluck('id')->toArray(); + $id = VehicleNewTranslationModel::where('name', 'like', '%'.$params['name_like'].'%')->pluck('vehicle_id')->toArray(); $params['filters'][] = ['field' => 'id', 'operator' => 'in', 'value' => $id]; } }