/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { $cuenta = BankAccount::where('enterprise_id', $id)->first(); $bancos = Bank::lists('nombre', 'id'); if ($cuenta) { return view('banks_accounts.edit', compact('cuenta', 'id', 'bancos')); } else { return view('banks_accounts.create', compact('id', 'bancos')); } }
/** * 列出银行账户 * @return mixed * @author AndyLee <*****@*****.**> */ public function getBankAccount() { $bank_list = BankAccount::where('company_id', Session::get('customer_id'))->get(); return view('customer.bank.index')->with('lists', $bank_list); }