public function actionBrandlist() { //分页读取类别数据 $brand = GoodsBrand::find(); $pagination = new Pagination(['defaultPageSize' => 10, 'totalCount' => $brand->count()]); $brand = $brand->orderBy('id ASC')->offset($pagination->offset)->limit($pagination->limit)->all(); return $this->render('brandlist', ['brand' => $brand, 'pagination' => $pagination]); }
public function actionGoodsadd() { //获取商品类型及其属性 $type = GoodsType::find()->all(); //获取商品分类信息 $category = new GoodsCategory(); $cate = $category->list_cate(); //获取商品品牌信息 $brand = GoodsBrand::find()->all(); $model = new Goods(); return $this->render('goodsadd', ['type' => $type, 'cate' => $cate, 'brand' => $brand, 'model' => $model]); }