feat: meal post ingredients
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\IngredientUnit;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class MealPostIngredientsRequest extends FormRequest
|
||||
{
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'meal_posts_id' => ['required', 'exists:meal_posts,id'],
|
||||
'position' => ['required', 'integer'],
|
||||
'ingredient' => ['required', 'string'],
|
||||
'unit' => ['required', Rule::enum(IngredientUnit::class)],
|
||||
];
|
||||
}
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user