/**
  * @param array $data
  */
 public function set(array $data = [])
 {
     $orderCustomer = OrderCustomer::where('id', $this->getOrderCustomerModel()->id)->first();
     foreach ($data as $key => $value) {
         $orderCustomer->{$key} = $value;
     }
     $orderCustomer->save();
     $this->setOrderCustomerModel($orderCustomer);
 }
Esempio n. 2
0
 /**
  * @return int
  */
 public function createOrderCustomer()
 {
     $orderCustomer = new OrderCustomer();
     $orderCustomer->save();
     return $orderCustomer->id;
 }