response()->alert()->error("设置失败1"); }else{ $balance_cash = data_get($input,'balance_cash',0); $shop = Shop::where('id',$input['id'])->first(); if (empty($shop)){ return $this->response()->alert()->error("设置失败2"); } try { SellerWalletService::adminRecharge($shop->id,auth('admin')->user()->id, $balance_cash); } catch (JingCaiException $exception) { return $this->response()->alert()->error($exception->getMessage()); } return $this->response()->success("设置成功")->refresh(); } } public function form() { $shop_id = $this->payload['id']; $shops = Shop::where('id',$shop_id)->first(); $this->display('shop_name','店铺名称')->with(function ($item)use($shops){ return $shops['name']; }); $this->text('balance_cash','店铺余额'); $this->hidden('id')->value($shop_id); } }