public static function send_welcome_mail($user,$code)
{
Mail::send('auth.email.welcome',['user'=>$user,'code'=>$code], function ($message)
{
$message->subject('Welcome');
$message->from('info@example.com', 'Example');
$message->to('info@exampleReceiver.com');
});
}
Sending Email works fine , but when i change to this (add receiver):public static function send_welcome_mail($user,$code,$receiver)
{
Mail::send('auth.email.welcome',['user'=>$user,'code'=>$code], function ($message)
{
$message->subject('Welcome');
$message->from('info@example.com', 'Example');
$message->to($receiver);
});
}
I got error:Undefined variable: receiverEmail
via skate