2020-05-28 05:08:13 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Mail;
|
|
|
|
|
|
|
|
use Carbon\Carbon;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
use Illuminate\Mail\Mailable;
|
|
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
|
2021-09-29 06:20:22 +00:00
|
|
|
use App\Models\{AdslSupplier,Site};
|
2020-05-28 05:08:13 +00:00
|
|
|
|
|
|
|
class TrafficMismatch extends Mailable
|
|
|
|
{
|
|
|
|
use Queueable, SerializesModels;
|
|
|
|
|
2021-09-29 06:20:22 +00:00
|
|
|
public AdslSupplier $aso;
|
|
|
|
public Carbon $date;
|
|
|
|
|
2020-05-28 05:08:13 +00:00
|
|
|
/**
|
|
|
|
* Create a new message instance.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function __construct(AdslSupplier $o,Carbon $date)
|
|
|
|
{
|
|
|
|
$this->aso = $o;
|
|
|
|
$this->date = $date;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Build the message.
|
|
|
|
*
|
|
|
|
* @return $this
|
|
|
|
*/
|
|
|
|
public function build()
|
|
|
|
{
|
|
|
|
return $this
|
|
|
|
->markdown('email.system.broadband_traffic_mismatch')
|
|
|
|
->subject('Traffic Mismatch for '.$this->date)
|
|
|
|
->with([
|
|
|
|
'site'=>Site::find(1), // @todo To auto determine
|
|
|
|
'date'=>$this->date,
|
|
|
|
'aso'=>$this->aso,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
}
|