示例#1
0
 /**
  * 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'));
 }
示例#2
0
 /**
  * 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");
 }