Esempio n. 1
0
 public function edit(Request $request, $id)
 {
     if ($request->method() == 'POST') {
         $id = $request->input('id');
         $b = Bankaccount::find($id);
         $b->code = $request->input('code');
         $b->name = $request->input('name');
         $b->accotitle = $request->input('accotitle');
         $b->bankid = $request->input('bankid');
         $b->branchname = $request->input('branchname');
         $b->opendate = CommonController::date_format($request->input('opendate'));
         $b->exdate = CommonController::date_format($request->input('exdate'));
         $b->rate = $request->input('rate');
         $b->openbalance = $request->input('openbalance');
         $b->save();
         return Redirect('bankaccount');
     }
     $data['bankaccount'] = Bankaccount::find($id);
     $ba = Bankinfo::get();
     return view('editbankaccount', $data)->with('bankinfo', $ba);
 }
Esempio n. 2
0
 public function delete(Request $request, $id)
 {
     $b = Bankinfo::find($id);
     $b->delete();
     return Redirect('bankinfo');
 }