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