Ich versuche, die Passwort-Reset-Mail auf Laravel in die Warteschlange zu stellen.Laravel Mail Queue Passwort zurücksetzen
Ich habe versucht, die PasswordBroker wie folgt Klonen:
<?php
namespace App;
use Closure;
use Illuminate\Auth\Passwords\PasswordBroker as IlluminatePasswordBroker;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
class PasswordBroker extends IlluminatePasswordBroker
{
public function emailResetLink(CanResetPasswordContract $user, $token, Closure $callback = null)
{
// We will use the reminder view that was given to the broker to display the
// password reminder e-mail. We'll pass a "token" variable into the views
// so that it may be displayed for an user to click for password reset.
$view = $this->emailView;
return $this->mailer->queue($view, compact('token', 'user'), function ($m) use ($user, $token, $callback) {
$m->to($user->getEmailForPasswordReset());
if (! is_null($callback)) {
call_user_func($callback, $m, $user, $token);
}
});
}
}
Dann bekomme ich diesen Fehler:
exception 'ErrorException' with message 'Serialization of closure failed: Serialization of closure failed: Serialization of 'Closure' is not allowed'
Wenn ich mailer->queue
ändern mailer->send
es funktioniert gut. Ich kann nicht verstehen, was passiert.
Die didn 't Arbeit ... Ich habe bereits versucht, ... – dante