|string> */ public function rules(): array { return [ 'year' => ['required', 'integer', 'min:2000', 'max:2100'], 'user_id' => ['nullable', 'integer', 'exists:users,id'], ]; } /** * Get the validation attribute names. * * @return array */ public function attributes(): array { return [ 'year' => __('validation.attributes.year'), 'user_id' => __('validation.attributes.user_id'), ]; } }