芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/www/vendor/laravel/fortify/src/Http/Controllers/NewPasswordController.php
guard = $guard; } /** * Show the new password view. * * @param \Illuminate\Http\Request $request * @return \Laravel\Fortify\Contracts\ResetPasswordViewResponse */ public function create(Request $request): ResetPasswordViewResponse { return app(ResetPasswordViewResponse::class); } /** * Reset the user's password. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Contracts\Support\Responsable */ public function store(Request $request): Responsable { $request->validate([ 'token' => 'required', Fortify::email() => 'required|email', 'password' => 'required', ]); // Here we will attempt to reset the user's password. If it is successful we // will update the password on an actual user model and persist it to the // database. Otherwise we will parse the error and return the response. $status = $this->broker()->reset( $request->only(Fortify::email(), 'password', 'password_confirmation', 'token'), function ($user) use ($request) { app(ResetsUserPasswords::class)->reset($user, $request->all()); app(CompletePasswordReset::class)($this->guard, $user); } ); // If the password was successfully reset, we will redirect the user back to // the application's home authenticated view. If there is an error we can // redirect them back to where they came from with their error message. return $status == Password::PASSWORD_RESET ? app(PasswordResetResponse::class, ['status' => $status]) : app(FailedPasswordResetResponse::class, ['status' => $status]); } /** * Get the broker to be used during password reset. * * @return \Illuminate\Contracts\Auth\PasswordBroker */ protected function broker(): PasswordBroker { return Password::broker(config('fortify.passwords')); } }