Пример #1
0
 /**
  * @return OrderDetail
  */
 public function getOrderDetailModel()
 {
     if (null === $this->orderDetailModel) {
         $orderDetailModel = Order::where('session_id', $this->getId())->first()->detail;
         $this->setOrderDetailModel($orderDetailModel);
     }
     return $this->orderDetailModel;
 }
Пример #2
0
 /**
  * @return OrderProducts
  */
 public function getOrderProductModel()
 {
     if (null === $this->orderProductModel) {
         $orderProductModel = Order::where('session_id', $this->getId())->first()->products();
         $this->setOrderProductModel($orderProductModel);
     }
     return $this->orderProductModel;
 }
Пример #3
0
 /**
  * @return OrderCustomer
  */
 public function getOrderCustomerModel()
 {
     if (null === $this->orderCustomerModel) {
         $orderCustomerModel = Order::where('session_id', $this->getId())->first()->customer;
         $this->setOrderCustomerModel($orderCustomerModel);
     }
     return $this->orderCustomerModel;
 }