Example #1
0
 public function getOrder()
 {
     return $this->hasOne(OrderSearch::className(), ['id' => 'order_id']);
 }
Example #2
0
 protected function findModel($id)
 {
     if (($model = OrderSearch::findOne($id)) !== null) {
         return $model;
     } else {
         throw new Exception('This not found');
     }
 }