/** * @return \yii\db\ActiveQuery */ public function getShops() { return $this->hasMany(Shop::className(), ['image_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getShop() { return $this->hasOne(Shop::className(), ['id' => 'shop_id']); }