<?php

namespace App\Mail;

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

use App\Models\Service;

class OrderRequestReject extends Mailable
{
    use Queueable, SerializesModels;

	public $service;
	public $reason;

    /**
     * Create a new message instance.
     *
     * @return void
     */
    public function __construct(Service $o,$reason)
    {
		$this->service = $o;
		$this->reason = $reason;
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
		return $this
			->markdown('email.admin.order.reject')
			->subject(sprintf('Your order: #%s was rejected',$this->service->id))
			->with(['site'=>$this->service->site]);
    }
}