get(User::class)->getTable(); return [ 'source_id' => 'required|nonempty', 'user_id' => 'required|nonempty|exists_enable:'.$userTable.',id', 'json_data' => 'json', ]; } public function messages(): array { return [ '*.nonempty' => ':attribute参数异常', 'user_id.exists_enable' => '用户不存在', ]; } public function attributes(): array { return [ ]; } }