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