$request->user() ]); } public function settings(Request $request): View { return view('private/profile/settings', [ 'user' => $request->user() ]); } public function update(UpdateRequest $request): RedirectResponse { $data = $request->getDto(); $user = $request->user(); $result = $this->profileService->update($data, $user); if ($result->isError()) { return redirect()->back()->withInput()->withErrors($result->getMessage()); } return redirect()->route('profile.edit')->withSuccess($result->getMessage()); } }