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:
@@ -32,6 +32,8 @@ class ProductResource extends JsonResource
|
||||
'ram' => $this->ram,
|
||||
'disk' => $this->disk,
|
||||
'bandwidth' => $this->bandwidth,
|
||||
'domain_count' => $this->domain_count,
|
||||
'features' => $this->features,
|
||||
'setup_fee' => $this->setup_fee,
|
||||
'min_price' => $minPrice,
|
||||
'billing_type' => $this->whenLoaded('pricings', function () {
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources\Api\Admin;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class ProductTypeFieldResource extends JsonResource
|
||||
{
|
||||
public function toArray($request): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'product_type' => $this->product_type,
|
||||
'group_label' => $this->group_label,
|
||||
'key' => $this->key,
|
||||
'label' => $this->label,
|
||||
'field_type' => $this->field_type,
|
||||
'sort_order' => $this->sort_order,
|
||||
'is_required' => $this->is_required,
|
||||
'created_at' => $this->created_at,
|
||||
'updated_at' => $this->updated_at,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user