Files
portal-api/app/Mail/VmSuspendedMail.php
baodev0 a31d238135 feat: Implement VM suspension feature with email notification
- Added suspend method in VCenterManagerController to handle VM suspension requests.
- Introduced VmSuspendedMail for notifying customers about VM suspension.
- Created email template for VM suspension notification.
- Updated API routes to include VM suspend functionality.
- Modified cors.php to allow additional local development URL.
- Updated DatabaseSeeder to include AdminSeeder and commented out unused seeders.
- Removed deprecated Livewire components related to cart, customer email history, invoices, orders, tickets, transactions, user settings, and VPS reinstall modal.
2026-05-21 10:17:16 +07:00

47 lines
1.1 KiB
PHP

<?php
namespace App\Mail;
use App\Models\Customer;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class VmSuspendedMail extends Mailable implements ShouldQueue
{
use Queueable, SerializesModels;
public function __construct(
public readonly Customer $customer,
public readonly string $vmName,
public readonly string $vmwareId,
) {}
public function envelope(): Envelope
{
return new Envelope(
subject: '[Thế Giới Số] Dịch vụ Cloud VPS của bạn đã bị tạm ngưng',
);
}
public function content(): Content
{
return new Content(
view: 'emails.customer.vm-suspended',
with: [
'customerName' => $this->customer->fullname,
'vmName' => $this->vmName,
'vmwareId' => $this->vmwareId,
],
);
}
public function attachments(): array
{
return [];
}
}