<?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; } }