osb/app/Mail/TrafficMismatch.php
Deon George 2e9f87550c
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 36s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
Move traffic mismatch mail tempaltes to admin/service
2024-08-03 11:49:34 +10:00

49 lines
871 B
PHP

<?php
namespace App\Mail;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Config;
use App\Models\{Supplier,Site};
class TrafficMismatch extends Mailable
{
use Queueable, SerializesModels;
public Supplier $aso;
public Carbon $date;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct(Supplier $o,Carbon $date)
{
$this->aso = $o;
$this->date = $date;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
Config::set('site',$x=Site::where('url',config('app.url'))->sole());
return $this
->markdown('mail.admin.service.traffic_mismatch')
->subject('Traffic Mismatch for '.$this->date)
->with([
'site'=>$x,
'date'=>$this->date,
'aso'=>$this->aso,
]);
}
}