public function delete($id) { $borrower = Borrower::find($id); if ($borrower != null) { DB::table('borrowers')->where('id', $id)->delete(); $borrower->delete(); } else { throw new Exception("Borrower not found."); } }
/** Additional functions. * */ public function addLoan($id) { $results = Borrower::find($id); return View::make('borrowers.addloan')->with('borrower', $results); }