/** * Store a newly created OccupancyRoom in storage. * * @param CreateOccupancyRoomRequest $request * * @return Response */ public function store(CreateOccupancyRoomRequest $request) { $input = $request->all(); $occupancyRoom = $this->occupancyRoomRepository->create($input); Flash::success('OccupancyRoom saved successfully.'); return redirect(route('occupancyRooms.index')); }
/** * Store a newly created OccupancyRoom in storage. * POST /occupancyRooms * * @param Request $request * * @return Response */ public function store(Request $request) { if (sizeof(OccupancyRoom::$rules) > 0) { $this->validateRequestOrFail($request, OccupancyRoom::$rules); } $input = $request->all(); $occupancyRooms = $this->occupancyRoomRepository->create($input); return $this->sendResponse($occupancyRooms->toArray(), "OccupancyRoom saved successfully"); }