<?php

namespace App\Mail;

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

class DrawingForPreliminariesWorks extends Mailable implements ShouldQueue
{
    use Queueable, SerializesModels;
    public $data;
    public $subject;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($data)
    {
        $this->data = $data;
        $this->subject = $data["SUBJECT"];
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $email = $this->markdown('emails.drawingForPreliminariesWorks')
            ->subject($this->subject)
            ->with('data', $this->data);
    }
}
