I recently upgraded my laravel 5.6 project to laravel 5.7, I am experiencing an issue right after I upraded to laravel 5.7. when I enter a registered email, password reset email is sent successfully and the correponding session status message is displayed in the page but when I enter a non registered email the $errors->first('email')
displays passwords.user instead if displaying We can't find a user with that e-mail address. (laravel predefined error message).
How do I solve this problem???
auth/passwords/email.blade.php:
<form action="{{ route('password.email') }}" class="forgot_Form text-center" method="POST" id="forgot_password">
@csrf
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<input type="email" class="form-control email" name="email" id="email" placeholder="Email" value="{{ old('email') }}">
@if ($errors->has('email'))
<span class="label label-danger">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<button type="submit" class="btn submit-btn">
Send Password Reset Link
</button>
</form>
ForgotPasswordController.php:
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
Result:
I am using laravel built-in authentication