示例#1
0
 /**
  * Remove the specified Room from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $room = $this->roomRepository->find($id);
     if (empty($room)) {
         Flash::error('Room not found');
         return redirect(route('admin.rooms.index'));
     }
     $this->roomRepository->delete($id);
     Flash::success('Room deleted successfully.');
     return redirect(route('admin.rooms.index'));
 }
示例#2
0
 /**
  * Remove the specified Room from storage.
  * DELETE /rooms/{id}
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $this->roomRepository->apiDeleteOrFail($id);
     return $this->sendResponse($id, "Room deleted successfully");
 }