merge([ 'diseaseId' => $this->route('diseaseId'), 'commentId' => $this->route('commentId') ]); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'diseaseId' => 'required|exists:diseases,id', 'commentId' => 'required|exists:comments,id', ]; } }