ldc-ovoteam/app/Http/Requests/Back/Recipes/StoreRecipeRequest.php

36 lines
768 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests\Back\Recipes;
use App\Services\AdminAuthService;
use Illuminate\Contracts\Validation\ValidationRule;
use Illuminate\Foundation\Http\FormRequest;
class StoreRecipeRequest extends FormRequest
{
public function __construct(
private readonly AdminAuthService $authService
) {}
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return $this->authService->check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
//
];
}
}