<?php

namespace App\Mail;

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

class DemandeContact extends Mailable
{
    use Queueable;
    use SerializesModels;

    protected $_name;
    protected $_company;
    protected $_email;
    protected $_phone;
    protected $_message;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($name, $company, $email, $phone, $message)
    {
        $this->_name = $name;
        $this->_company = $company;
        $this->_email = $email;
        $this->_phone = $phone;
        $this->_message = $message;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->markdown('emails.welcome.contact')
            ->with([
                'name' => $this->_name,
                'company' => $this->_company,
                'email' => $this->_email,
                'phone' => $this->_phone,
                'message' => $this->_message,
            ]);
    }
}
