<?php

namespace Daite\Coopdigital\Mail;

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

class CorreoRegistro extends Mailable
{
    use Queueable, SerializesModels;

    public $datosCorreo;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($datosCorreo) {

        $this->datosCorreo = $datosCorreo;

    }

    /**
     * Build the message.
     *
     * @return $this
     */

    public function build() {

        $datosCorreo = $this->datosCorreo;

        return $this
        
        ->subject('Su solicitud de registro está en proceso')
        ->to($datosCorreo['correo'])
        ->view('coopdigital::correos.notificacionRegistro', $datosCorreo);

    }

}
