Esempio n. 1
0
 public function getOrderClass()
 {
     return Order::className();
 }
Esempio n. 2
0
 public function getOrders()
 {
     return $this->hasMany(Order::className(), ['customer_id' => 'id'])->orderBy('created_at');
 }
Esempio n. 3
0
 public function getExpensiveOrders()
 {
     return $this->hasMany(Order::className(), ['customer_id' => 'id'])->filter(['range' => ['total' => ['gte' => 50]]])->orderBy('id');
 }
Esempio n. 4
0
 public function getOrder()
 {
     return $this->hasOne(Order::className(), ['id' => 'order_id']);
 }