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:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\ProductTypeField;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProductTypeFieldRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
$sometimes = $this->isMethod('put') || $this->isMethod('patch') ? 'sometimes|' : '';
|
||||
|
||||
return [
|
||||
'product_type' => $sometimes . 'required|string|max:50',
|
||||
'group_label' => 'nullable|string|max:255',
|
||||
'key' => $sometimes . 'required|string|max:255',
|
||||
'label' => $sometimes . 'required|string|max:255',
|
||||
'field_type' => $sometimes . 'required|string|in:text,number,textarea,repeater',
|
||||
'sort_order' => 'nullable|integer',
|
||||
'is_required' => 'boolean',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user