public function update(Request $request, $id) { $account = WechatAccount::find($id); if (empty($account)) { return $this->failure_noexists(); } $keys = 'name,description,wechat_type,account,appid,appsecret,token,encodingaeskey,qr_aid,mchid,mchkey,sub_mch_id'; $data = $this->autoValidate($request, 'wechat-account.store', $keys, $account); $account->update($data); return $this->success(); }
public function choose(Request $request, $url = NULL) { $accounts = WechatAccount::all(); return view('wechat::wechat.choose')->with('_accounts', $accounts)->with('_account', WechatAccount::find((new WechatAccountTool())->getAccountID()))->with('_url', $url); }