bcryptPassword($request); auth()->user()->update($request->all()); return back()->withSuccess(trans('admin::messages.resource_saved', [ 'resource' => trans('user::users.profile'), ])); } /** * Bcrypt user password. * * @param \Illuminate\Http\Request $request * @return void */ private function bcryptPassword($request) { if ($request->filled('password')) { return $request->merge(['password' => bcrypt($request->password)]); } unset($request['password']); } }