Quick Fire Question, I am using mail function of laravel 5.1, but it still gives me variable not defined error, I have debugged and checked the variable I am printing is valid.
$email_id = $users[0]['email_id'];
//i have checked $email_id by printing and it is working.
Mail::send('emails.forgetpassword', ['title' => $title, 'name' => $name, 'content' => $content, 'link' => $link], function ($message)
{
$message->from('xyz@gmail.com', 'xyz Team');
$message->to($email_id);
$message->subject('xyz App - Forget Password');
});
I have checked the documentation I don't know what it is missing. It throws me error at this line
$message->to($email_id);
I don't know why $email_id is already defined and working.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire