<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class NuevaConsultaRecibida extends Mailable
{
    use Queueable, SerializesModels;

    public $data;

    public function __construct($data) {
        $this->data = $data;
    }

    public function build() {
        return $this->view('emails.nueva_consulta')
                    ->subject('Consulta Concurso: ' . $this->data['asunto'])
                    ->replyTo($this->data['email'], $this->data['nombre']);
    }
}