In my laravel project am trying to imaplement forget password functinality. I succesfully got a password reset email, but when i submit that form which contains new password, its generating this errorTarget class [App\Http\Controllers\User\UserAuth\ResetPassswordController] does not exist.
But there isResetPassswordController.php named file in specified path.
Following is the code of Resetpasswordcontroller.php
<?php
namespace App\Http\Controllers\User\UserAuth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Password;
use Illuminate\Http\Request;
use JsValidator;
class ResetPasswordController extends Controller
{
/*
|
Following is the code in routes (web.php)
{-code-4}
Following is the code of form submission, which contains new password
----
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
public $redirectTo = '/user/dashboard';
protected $validationRules = [
'name' => 'required|max:255',
'email' => 'required|email|max:255',
'password' => 'required|min:6|confirmed',
];
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
// $this->middleware('user.guest');
}
/**
* Display the password reset view for the given token.
*
* If no token is present, display the link request form.
*
* @param \Illuminate\Http\Request $request
* @param string|null $token
* @return \Illuminate\Http\Response
*/
public function showResetForm(Request $request, $token = null)
{
$validator = JsValidator::make($this->validationRules,[],[],'#resetform');
return view('user.auth.passwords.reset')->with(
['token' => $token, 'email' => $request->email, 'validator' => $validator]
);
}
/**
* Get the broker to be used during password reset.
*
* @return \Illuminate\Contracts\Auth\PasswordBroker
*/
public function broker()
{
return Password::broker('users');
}
/**
* Get the guard to be used during password reset.
*
* @return \Illuminate\Contracts\Auth\StatefulGuard
*/
protected function guard()
{
return Auth::guard('user');
}
}|||Route::get('/', 'User\UserAuth\LoginController@showLoginForm')->name('login');
Route::get('/register', 'User\UserAuth\LoginController@showLoginForm')->name('register');
Route::post('user/login', 'User\UserAuth\LoginController@login')->name('postLogin');
Route::post('user/logout', 'User\UserAuth\LoginController@logout')->name('logout');
Route::get('user/password/reset', 'User\UserAuth\ForgotPasswordController@showLinkRequestForm')->name('password.reset');
Route::post('user/password/email', 'User\UserAuth\ForgotPasswordController@sendResetLinkEmail')->name('password.reequest');
Route::post('user/password/reset', 'User\UserAuth\ResetPassswordController@reset')->name('password.email');
Route::get('user/password/reset/{token}', 'User\UserAuth\ResetPasswordController@showResetForm');|||<form class="" role="form" method="POST" action="{{ url('/user/password/reset') }}" id="resetform">
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
About the technologies asked in this question
PHP
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license. https://www.php.net/
Laravel
Laravel is a free open source PHP framework that came out in 2011. Since then, it has been able to become the framework of choice for web developers. One of the main reasons for this is that Laravel makes it easier, faster, and safer to develop complex web applications than any other framework. https://laravel.com/
Foundation
Foundation, similar to Bootstrap, has become very popular as a more complex framework with some advanced but easy-to-implement CSS components. It is built with Sass, so just like Bootstrap, it is customizable. In addition to this, it also boasts some features that help make the design mobile responsive. https://get.foundation/
Welcome to programmierfrage.com
programmierfrage.com is a question and answer site for professional web developers, programming enthusiasts and website builders. Site created and operated by the community. Together with you, we create a free library of detailed answers to any question on programming, web development, website creation and website administration.
Get answers to specific questions
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Help Others Solve Their Issues
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.
This site uses cookies. We use them to improve the performance of our website and your interaction with it. Confirm your consent by clicking OK