示例#1
0
 /**
  * Update order
  *
  * @param Order $order
  * @param array $data
  * @throws \SaleBoss\Repositories\Exceptions\InvalidArgumentException
  * @return mixed
  */
 public function update(Order $order, array $data = [])
 {
     try {
         $order->update($data);
         return $order;
     } catch (QueryException $e) {
         throw new InvalidArgumentException($e->getMessage());
     }
 }
示例#2
0
 public function findLastLogFor(Order $order)
 {
     return $order->orderLogs()->with('changer')->orderBy('created_at', 'DESC')->first();
 }