I'm having this code in my function in the controller
$team->users()->each(function ($user) {
\Mail::to($user)->send(
new NotificationEmail($user)
);
});
return back();
This is throwing a 404 on my screen.
if I try something like this though \Mail::to($team->users()->first()) the email is send successfully but only on the first user of course.
Any ideas what I'm doing wrong?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire