/** * Remove the specified Reservation from storage. * * @param int $id * * @return Response */ public function destroy($id) { $reservation = $this->reservationRepository->find($id); if (empty($reservation)) { Flash::error('Reservation not found'); return redirect(route('reservations.index')); } $this->reservationRepository->delete($id); Flash::success('Reservation deleted successfully.'); return redirect(route('reservations.index')); }
/** * Remove the specified Reservation from storage. * DELETE /reservations/{id} * * @param int $id * * @return Response */ public function destroy($id) { $this->reservationRepository->apiDeleteOrFail($id); return $this->sendResponse($id, "Reservation deleted successfully"); }