radfusion/app/Http/Requests/CreateReportRequest.php
2025-01-09 12:22:07 +06:00

24 lines
436 B
PHP

<?php
namespace App\Http\Requests;
use App\Models\Study;
use App\Rules\ExistsByHash;
use Illuminate\Foundation\Http\FormRequest;
class CreateReportRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'hashid' => ['required', new ExistsByHash(Study::class)],
'content' => 'required',
];
}
}