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