I am using Mail::send function to send emails to my end users with dynamically generated links in them Below is my sample code for the function - $myemail = "some email adderess"; $myurl = "some url that will be emailed";
Mail::send('emails.mybladetemplate', ['myemail' => $myemail] , function ($message) use ($myemail){
$message->subject('Your favorite links');
$message->from('someone@company.com', 'Company');
$message->to($myemail);
});
I am having trouble passing $myurl to the blade template and publishing it. I even used HTML in my blade template but no success. I have tested Mail::send with other templates and it works fine. Just not when I pass the variables.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire