Я использую встроенную функцию laravel auth. Он работает отлично. Я пытаюсь переопределить следующие две функции.Override Auth Forgot Password в Laravel 5.3
1.send забыл пароль по электронной почте с использованием мандрилла.
2.получайте подтверждение электронной почты при регистрации учетной записи.
Может ли один помочь мне решить эту проблему
Моя цель заключается в использовании оправке вместо электронной почты по умолчанию
Я вижу Auth встроенных методов, но я не получил идею, как я могу переопределить
trait ResetsPasswords
{
use RedirectsUsers;
/**
* 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\Contracts\View\Factory|\Illuminate\View\View
*/
public function showResetForm(Request $request, $token = null)
{
return view('auth.passwords.reset')->with(
['token' => $token, 'email' => $request->email]
);
}
/**
* Reset the given user's password.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function reset(Request $request)
{
$this->validate($request, $this->rules(), $this->validationErrorMessages());
// 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.
$response = $this->broker()->reset(
$this->credentials($request), function ($user, $password) {
$this->resetPassword($user, $password);
}
);
// 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 $response == Password::PASSWORD_RESET
? $this->sendResetResponse($response)
: $this->sendResetFailedResponse($request, $response);
}
. Спасибо. Я.i также видел в файле mail.php config.how, чтобы отправить проверку подлинности электронной почты при регистрации и изменении шаблона – iCoders
, если я изменю на mandrill, я получил следующую ошибку. Пассирование в опции запроса «тело» в виде массива для отправки запроса POST устарели.Пожалуйста, используйте параметр запроса «form_params» для отправки запроса приложения/x-www-form-urlencoded или опции «multipart» для отправки запроса multipart/form-data. – iCoders
О! Это связано с проблемой обесценения в GuzzleHttp. Проверьте здесь: https://laracasts.com/discuss/channels/laravel/l5-mandrill-error –