Exemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     // Bank details
     $uId = \Auth::user()->id;
     $bank_name = \Input::get('bank_name');
     $account_no = \Input::get('account_no');
     $account_type = \Input::get('account_type');
     $branch = \Input::get('branch');
     $micr_no = \Input::get('micr_no');
     $ifsc_code = \Input::get('ifsc_code');
     $status = \Input::get('status');
     // Insert into table
     $bankId = \BankDetail::insertGetId(array('bank_name' => $bank_name, 'account_no' => $account_no, 'account_type' => $account_type, 'branch' => $branch, 'micr_no' => $micr_no, 'ifsc_code' => $ifsc_code, 'status' => $status, 'user_id' => $uId));
     if ($bankId) {
         return \Redirect::back()->with('success', 'Bank details successfully added');
     } else {
         return \Redirect::back()->with('error', 'Bank detail failed to add');
     }
 }