zhangchangchun лет назад: 6
Родитель
Сommit
d2bbed5d66
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/Http/Controllers/V1/ShopController.php

+ 1 - 1
app/Http/Controllers/V1/ShopController.php

@@ -48,7 +48,7 @@ class ShopController extends Controller {
             return $this->jsonError($validator->errors()->first());
         }
 
-        $shop = Shop::whereIn('shop_id',explode(',',$data['ids']))->where('status',0)->select('shop_id','shop_name')->get();
+        $shop = Shop::whereIn('shop_id',explode(',',$data['ids']))->where('status',0)->pluck('shop_name','shop_id');
         if($shop){
             return $this->jsonSuccess($shop);
         }else{