2018-09-18 02:37:04 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
2022-09-29 02:16:08 +00:00
|
|
|
use Illuminate\Support\Facades\Config;
|
2018-09-18 02:37:04 +00:00
|
|
|
|
|
|
|
use App\Models\Service;
|
|
|
|
|
|
|
|
class OrderRequestReject extends Mailable
|
|
|
|
{
|
|
|
|
use Queueable, SerializesModels;
|
|
|
|
|
2021-09-29 06:20:22 +00:00
|
|
|
public Service $service;
|
|
|
|
public string $reason;
|
2018-09-18 02:37:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create a new message instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2021-09-29 06:20:22 +00:00
|
|
|
public function __construct(Service $o,string $reason)
|
2018-09-18 02:37:04 +00:00
|
|
|
{
|
|
|
|
$this->service = $o;
|
|
|
|
$this->reason = $reason;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build the message.
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function build()
|
|
|
|
{
|
2022-09-29 02:16:08 +00:00
|
|
|
Config::set('site',$this->service->site);
|
|
|
|
|
2018-09-18 02:37:04 +00:00
|
|
|
return $this
|
2024-08-03 00:06:25 +00:00
|
|
|
->markdown('mail.admin.order.reject')
|
2018-09-18 02:37:04 +00:00
|
|
|
->subject(sprintf('Your order: #%s was rejected',$this->service->id))
|
|
|
|
->with(['site'=>$this->service->site]);
|
|
|
|
}
|
|
|
|
}
|