user()->can('kitaran.urus'); } public function rules(): array { $cycleId = $this->route('reporting_cycle')?->id; return [ 'renewal_year' => [ 'required', 'integer', 'min:2000', 'max:2100', Rule::unique('reporting_cycles', 'renewal_year')->ignore($cycleId), ], 'cut_off_date' => ['nullable', 'date'], 'licence_period_year' => ['required', 'integer', 'min:1', 'max:10'], 'checklist_template_id' => ['nullable', 'exists:checklist_templates,id'], 'status' => ['required', 'in:aktif,tutup'], 'catatan' => ['nullable', 'string', 'max:1000'], ]; } public function attributes(): array { return [ 'renewal_year' => 'tahun pembaharuan', 'cut_off_date' => 'tarikh tutup', 'licence_period_year' => 'tempoh lesen (tahun)', ]; } }