コード例 #1
0
 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.");
     }
 }
コード例 #2
0
 /** Additional functions.
  *
  */
 public function addLoan($id)
 {
     $results = Borrower::find($id);
     return View::make('borrowers.addloan')->with('borrower', $results);
 }