Files
portal-api/app/Mail/VmSuspendedMail.php
2026-10-05 09:30:24 +07:00

43 lines
1.1 KiB
PHP

<?php
namespace App\Mail;
use App\Models\Customer;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\SerializesModels;
class VmSuspendedMail extends TemplateMailable implements ShouldQueue
{
use Queueable, SerializesModels;
public function __construct(
public readonly Customer $customer,
public readonly string $vmName,
public readonly string $vmwareId,
) {}
public function attachments(): array
{
return [];
}
protected function scenario(): string
{
return 'vm_suspended';
}
protected function variables(): array
{
return [
'customer_name' => $this->customer->fullname,
'vm_name' => $this->vmName,
'vmware_id' => $this->vmwareId,
'suspended_at' => now()->setTimezone('Asia/Ho_Chi_Minh')->format('d/m/Y H:i'),
'login_url' => rtrim(config('app.frontend_url', ''), '/') . '/dang-nhap',
'support_email' => 'support@tgs.com.vn',
'support_phone' => '(028) 7309. 7379',
];
}
}