/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { $bank = \BankDetail::where('id', '=', $id)->firstOrFail(); if (!$bank->delete()) { return \Redirect::back()->with('error', 'Unalble to delete try again'); } else { return \Redirect::back()->with('success', 'Successfully deleted'); } }
public function getBankDetail() { $uId = \Auth::user()->id; $bank = \BankDetail::where('user_id', '=', $uId)->paginate(15); return \View::make('admin/bank.bank_detail')->with('bank', $bank); }