In my app I am trying to send an email using Mail::queue()
.
I get an exception saying that serialization of closure failed.
ErrorException in SerializableClosure.php line 93: Serialization of closure failed: Serialization of 'Closure' is not allowed
I have a this as the send function:
public function send()
{
$view = view('emails.welcome');
$data = [
'user' => Auth::user()
];
return $this->mailer->queue($view, $data, function($message){
$message->to($this->to)->subject($this->subject);
});
}
I've only recently begun using Laravel so any help would be great.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire