Beispiel #1
0
 /**
  * Store a newly created Guest in storage.
  *
  * @param CreateGuestRequest $request
  *
  * @return Response
  */
 public function store(CreateGuestRequest $request)
 {
     $input = $request->all();
     $guest = $this->guestRepository->create($input);
     Flash::success('Guest saved successfully.');
     return redirect(route('guests.index'));
 }
Beispiel #2
0
 /**
  * Store a newly created Guest in storage.
  * POST /guests
  *
  * @param Request $request
  *
  * @return Response
  */
 public function store(Request $request)
 {
     if (sizeof(Guest::$rules) > 0) {
         $this->validateRequestOrFail($request, Guest::$rules);
     }
     $input = $request->all();
     $guests = $this->guestRepository->create($input);
     return $this->sendResponse($guests->toArray(), "Guest saved successfully");
 }