Exemple #1
0
 /**
  * Displays a single Goods model.
  * @param integer $id
  * @return mixed
  */
 public function actionView($id)
 {
     $list = AttachmentRel::getByRes('share', $id);
     return $this->render('view', ['model' => $this->findModel($id), 'imgs' => $list]);
 }
Exemple #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAttachmentRels()
 {
     return $this->hasMany(AttachmentRel::className(), ['attach_id' => 'id']);
 }
Exemple #3
0
 /**
  * Displays a single Goods model.
  * @param integer $id
  * @return mixed
  */
 public function actionView($id)
 {
     $av = AvRel::getGoodsRel($id);
     $model = $this->findModel($id);
     return $this->render('view', ['model' => $model, 'av' => $av, 'imgs' => AttachmentRel::getByRes('shop_goods', $id, 'small', [$model->cover])]);
 }