<?php

namespace App\Mail;

use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use App\Mail\BaseMailable;
use Illuminate\Queue\SerializesModels;

class GiftCodeSend extends BaseMailable
{
    use Queueable, SerializesModels;

   public array $details;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct($details)
    {
        parent::__construct();
        $this->details = $details;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->subject(config('app.name') . ': ' . $this->details['subject'])->view('frontend.email.giftcode-send-mail')->with([
            'footerLink' => $this->footerLink
        ]);
    }
}
