radfusion/app/Http/Requests/StudyHistoryRequest.php
2025-01-01 13:41:49 +06:00

27 lines
590 B
PHP

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