ldc-com-app-bo/app/Mail/SendFlyer.php

42 lines
822 B
PHP
Raw Permalink Normal View History

2023-07-13 08:34:54 +00:00
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
2025-09-24 11:27:55 +02:00
use Illuminate\Contracts\Queue\ShouldQueue;
2023-07-13 08:34:54 +00:00
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
2025-09-24 11:27:55 +02:00
class SendFlyer extends Mailable implements ShouldQueue
2023-07-13 08:34:54 +00:00
{
use Queueable;
use SerializesModels;
/** @var object */
public $data;
/**
* Create a new message instance.
*
* @param mixed $data
* @return void
*/
public function __construct(mixed $data)
2023-07-13 08:34:54 +00:00
{
$this->data = (object) $data;
2023-07-13 08:34:54 +00:00
}
/**
* Build the message.
*
* @return mixed
2023-07-13 08:34:54 +00:00
*/
public function build(): mixed
2023-07-13 08:34:54 +00:00
{
return $this
2025-09-24 11:27:55 +02:00
->from(config('mail.from.address'), $this->data->fromName)
2023-07-13 08:34:54 +00:00
->subject($this->data->subject)
->markdown('bo.mails.sendflyer');
}
}