feat: Add IT Support catalog and related migrations, seeders, and email templates

- Created migration to add 'group_label' to 'product_type_fields' table.
- Implemented ItSupportCatalogSeeder to populate IT Support features and tiers.
- Added ProductCategorySeeder for initial product categories.
- Developed ProductMockupSeeder for mockup products in various categories.
- Introduced ProductTypeFieldSeeder to define fields for different product types.
- Created email templates for VPS service information and service renewal reminders.
This commit is contained in:
baodev0
2026-08-26 16:19:38 +07:00
parent 382b7c0ef8
commit c917e3bf5e
47 changed files with 2992 additions and 1759 deletions
+46
View File
@@ -0,0 +1,46 @@
<?php
namespace App\Mail;
use App\Models\Customer;
use App\Models\Service;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
class ServiceRenewalReminderMail extends Mailable
{
use Queueable, SerializesModels;
public function __construct(
public readonly Customer $customer,
public readonly Service $service,
) {}
public function envelope(): Envelope
{
$name = $this->service->server_name ?? $this->service->product?->name ?? 'dịch vụ';
return new Envelope(subject: "Nhắc gia hạn dịch vụ {$name}");
}
public function content(): Content
{
return new Content(
view: 'emails.customer.service-renewal-reminder',
with: [
'clientName' => $this->customer->fullname ?? '',
'productName' => $this->service->product?->name ?? 'Dịch vụ',
'serverName' => $this->service->server_name ?? '',
'expiresAt' => $this->service->expires_at
? \Carbon\Carbon::parse($this->service->expires_at)->format('d/m/Y')
: 'N/A',
'price' => $this->service->orderItem?->price
? number_format((float) $this->service->orderItem->price, 0, ',', '.')
: null,
],
);
}
}