Files
2026-10-05 09:30:24 +07:00

36 lines
768 B
PHP

<?php
namespace App\Mail\Customer;
use App\Mail\TemplateMailable;
use App\Support\MailGlobals;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
class Welcome extends TemplateMailable
{
use Queueable, SerializesModels;
public function __construct(public array $data) {}
public function attachments(): array
{
return [];
}
protected function scenario(): string
{
return 'customer_welcome';
}
protected function variables(): array
{
$data = [...MailGlobals::values(), ...$this->data];
return [
'app_name' => $data['company_name'] ?? config('app.name', 'The Gioi So'),
'full_name' => $data['fullname'] ?? 'Quý khách',
];
}
}