示例#1
0
 public function deleteReservation($reservation)
 {
     $reservation = Reservation::find($reservation);
     if (!$reservation) {
         return Redirect::back()->withErrors('Could not find reservation');
     }
     $reservation->delete();
     $reservation = Reservation::paginate(5);
     return Redirect::to('admin/reservations');
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     return View::make('admin.reservations.index')->with('reservations', Reservation::paginate(5));
 }