Example #1
0
 public function getSells()
 {
     return $this->hasMany(Sell::className(), ['id' => 'sell_id'])->viaTable('detail', ['product_id' => 'id']);
 }
Example #2
0
 public function getSells()
 {
     return $this->hasMany(Sell::className(), ['user_id' => 'id'])->orderBy(['id' => SORT_DESC]);
 }