request->param('category_id'); if (empty($category_id)) { $this->error('分类不能为空'); } $list = (new AttributeModel())->with(['AttributeValue'])->where('category_id', $category_id)->where('is_search', 1)->select(); $this->success('获取成功', $list); } }