/** * Update the specified reservation in storage. * * @param Reservation $reservation * @return Response */ public function update(Reservation $reservation, UpdateReservationRequest $request) { $reservation->user()->associate($request->get('user_id')); $reservation->resource()->associate($request->get('resource_id')); $this->updateTimeFields($reservation, $request); $reservation->save(); return redirect()->route('admin.reservations.index'); }
/** * Update the specified Reservation in storage. * * @param int $id * @param UpdateReservationRequest $request * * @return Response */ public function update($id, UpdateReservationRequest $request) { $reservation = $this->reservationRepository->find($id); if (empty($reservation)) { Flash::error('Reservation not found'); return redirect(route('reservations.index')); } $this->reservationRepository->updateRich($request->all(), $id); Flash::success('Reservation updated successfully.'); return redirect(route('reservations.index')); }