<?php

namespace App\Mail;

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

class PasswordReset extends Mailable
{
    use Queueable, SerializesModels;

    private $id;

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

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->view('mail.html.user-reset')
            ->subject('Reset Password')
            ->with([
            'url' => env('FRONTEND_URL') . '/' . env('ACCOUNT_RESET') . '/' . $this->id
        ]);
    }
}
