user() !== null; } protected function prepareForValidation(): void { parent::prepareForValidation(); $this->merge([ 'class_section_id' => $this->route('classSectionId'), 'school_year' => $this->route('schoolYear'), ]); } public function rules(): array { return [ 'class_section_id' => ['required', 'string', 'max:32'], 'school_year' => ['required', 'string', 'max:9'], 'semester' => ['nullable', 'string', 'max:255'], ]; } }