<?php

namespace App\Classes\Notifications;


use App\Models\User;
use App\Models\UserEmailVerification;
use Illuminate\Notifications\Messages\MailMessage;

class UserVerificationEmail extends AbstractEmail
{

    /** @var User */
    private $user;

    /** @var UserEmailVerification */
    private $attempt;

    /**
     * UserVerificationEmail constructor.
     * @param User $user
     * @param UserEmailVerification $attempt
     */
    public function __construct(User $user, UserEmailVerification $attempt)
    {
        $this->user = $user;
        $this->attempt = $attempt;
    }


    public function toMail()
    {
        return (new MailMessage)
            ->subject('Email Verification')
            ->view('emails.accounts.user_verification', ['user' => $this->user, 'attempt' => $this->attempt]);
    }


}
