migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Http\Requests\MenuSection;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class MenuSectionStoreRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'menu_category_id' => 'required|exists:menu_categories,id',
|
||||
'name' => 'required|string|max:100',
|
||||
'slug' => 'nullable|string|max:150',
|
||||
'description' => 'nullable|string|max:500',
|
||||
'priority' => 'nullable|integer|min:0',
|
||||
'status' => 'required|boolean',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'menu_category_id.required' => 'Please select a menu category.',
|
||||
'menu_category_id.exists' => 'The selected category does not exist.',
|
||||
'name.required' => 'Section name is required.',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Http\Requests\MenuSection;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class MenuSectionUpdateRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'menu_category_id' => 'required|exists:menu_categories,id',
|
||||
'name' => 'required|string|max:100',
|
||||
'slug' => 'nullable|string|max:150',
|
||||
'description' => 'nullable|string|max:500',
|
||||
'priority' => 'nullable|integer|min:0',
|
||||
'status' => 'required|boolean',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'menu_category_id.required' => 'Please select a menu category.',
|
||||
'menu_category_id.exists' => 'The selected category does not exist.',
|
||||
'name.required' => 'Section name is required.',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user