user() !== null; } /** * 方法功能:返回签到日历查询规则。 * * @return array */ public function rules(): array { return [ 'month' => ['nullable', 'date_format:Y-m'], ]; } /** * 方法功能:返回签到日历查询的中文错误提示。 * * @return array */ public function messages(): array { return [ 'month.date_format' => '月份格式不正确。', ]; } }