osb/app/Mail/OrderRequestReject.php

42 lines
817 B
PHP
Raw Normal View History

<?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 $service;
public string $reason;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(Service $o,string $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]);
}
}