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