<?php

namespace App\Mail;

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


class AppointmentNotificationMail extends Mailable
{
    use Queueable, SerializesModels;

    public $fromAddress;
    public $subject;
    public $data;
    public $helper;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($from,$subject,$data)
    {
        $this->fromAddress = $from;
        $this->subject = $subject;
        $this->data = $data;
        $this->helper = Helper::class;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        $this->from($this->fromAddress, $this->subject);
        return $this->view('mail.appointment-notification');
    }

}
