私はlaravel auth機能を内蔵しています。うまくいきます。次の2つの機能をオーバーライドしようとしています。オーバーライド認証Laravelのパスワードを忘れました5.3
1.send mandrelを使用してパスワードを忘れました。
2.アカウントの登録中に送信確認メールを送信します。
いずれかがこの問題を解決するために私を助けることができる
私の目的は、マンドレルの代わりに、デフォルトの電子メール
を使用することです私は、認証がメソッドに建てられたが、私はその
をオーバーライドすることができますどのように得たアイデアをdidntの見ることができます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);
}
.Thanks.Ya.iもmail.php configファイルで見ました。登録時に電子メールの検証を送信し、テンプレートを変更すると – iCoders
私はマンドリルに変更するとエラーが発生しました。 "body"リクエストオプションを配列としてパッシングPOST要求を送信することは推奨されていません。application/x-www-form-urlencodedリクエストを送信するには、 "form_params"リクエストオプションを使用し、multipart/form-dataリクエストを送信するには "multipart"リクエストオプションを使用してください。 – iCoders
ああ!これは、GuzzleHttpの減価償却の問題によるものです。ここをクリックしてください:https://laracasts.com/discuss/channels/laravel/l5-mandrill-error –