/** * Update the specified BookingRoomTypes in storage. * PUT/PATCH /bookingRoomTypes/{id} * * @param int $id * @param Request $request * * @return Response */ public function update($id, Request $request) { $input = $request->all(); /** @var BookingRoomTypes $bookingRoomTypes */ $bookingRoomTypes = $this->bookingRoomTypesRepository->apiFindOrFail($id); $result = $this->bookingRoomTypesRepository->updateRich($input, $id); $bookingRoomTypes = $bookingRoomTypes->fresh(); return $this->sendResponse($bookingRoomTypes->toArray(), "BookingRoomTypes updated successfully"); }
/** * Update the specified BookingRoomTypes in storage. * * @param int $id * @param UpdateBookingRoomTypesRequest $request * * @return Response */ public function update($id, UpdateBookingRoomTypesRequest $request) { $bookingRoomTypes = $this->bookingRoomTypesRepository->find($id); if (empty($bookingRoomTypes)) { Flash::error('BookingRoomTypes not found'); return redirect(route('bookingRoomTypes.index')); } $this->bookingRoomTypesRepository->updateRich($request->all(), $id); Flash::success('BookingRoomTypes updated successfully.'); return redirect(route('bookingRoomTypes.index')); }