Hi Im trying to send a mail but when I try using the Mail::Send but the variables im creating to have the information to which mail it will be send wont go into the Mail::Send part. I dont know why it always tells me undifined variable, when its defined right on top. Here is the code
$result = DB::table('perfil')->where('usuario', $object['usuario'])->first();
$info = array('confirmation_code' => $result->codigoVerificacion, 'nombre' => $result->nombre);
$mail = $result->correoVerificado;
$nombre = $result->nombre.' '.$result->primerPaterno.' '.$result->segundoApellido;
Mail::send('emails.registro_nuevo_usuario', $info, function($message)
{
$message->from('jfeuchter@gmail.com', 'Jurgen Feuchter');
$message->to($mail, $nombre)
->subject('¡Bienvenido a la mejor red social para pedir y dar rides!');
});
If you need more code ask me for it please :P
'Undefined variable: mail' in \app\controllers\registroController.php:103