migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Http\Requests\FoodVariantIngredient;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FoodVariantIngredientStoreRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'food_variant_id' => 'required|exists:food_variants,id',
|
||||
'ingredients' => 'required|array|min:1',
|
||||
'ingredients.*.ingredient_id' => 'required|exists:ingredients,id',
|
||||
'ingredients.*.quantity' => 'required|numeric|min:0',
|
||||
'ingredients.*.wastage_percentage' => 'nullable|numeric|min:0',
|
||||
'ingredients.*.unit_conversion_factor' => 'nullable|numeric|min:0',
|
||||
'ingredients.*.optional' => 'nullable|in:Y,N',
|
||||
'ingredients.*.notes' => 'nullable|string',
|
||||
'ingredients.*.status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Restaurant\Http\Requests\FoodVariantIngredient;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FoodVariantIngredientUpdateRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'food_variant_id' => 'sometimes|required|exists:food_variants,id',
|
||||
'ingredient_id' => 'sometimes|required|exists:ingredients,id',
|
||||
'quantity' => 'sometimes|required|numeric|min:0',
|
||||
'wastage_percentage' => 'nullable|numeric|min:0',
|
||||
'unit_conversion_factor' => 'nullable|numeric|min:0',
|
||||
'optional' => 'nullable|in:Y,N',
|
||||
'notes' => 'nullable|string',
|
||||
'status' => 'nullable|in:0,1',
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user