<?php

namespace App\Mail;

use App\Models\Core\Mail\MailTemplate;
use App\Repositories\Shop\Traits\MailCustomers;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Spatie\MailTemplates\TemplateMailable;

class Bienvenue extends TemplateMailable
{
    use MailCustomers, Queueable, SerializesModels;

    public $email;

    public $nom;

    public $prenom;

    public $societe;

    public $subject;

    protected static $templateModelClass = MailTemplate::class;

    public function __construct($user, $subject = '')
    {
        $this->prenom = $user->first_name;
        $this->nom = $user->last_name;
        $this->societe = $user->society;
        $this->email = $user->email;
        $this->subject = $subject;
    }
}
