validator; } public function beforeServiceStore($data, Request $request): array { if(empty($data['product_name'])){ throw new BusinessException('产品名称不能为空'); } if(empty($data['images'])){ throw new BusinessException('产品图片不能为空'); } return $data; } }