@@ -75,7 +75,7 @@ |
||
| 75 | 75 | |
| 76 | 76 | public function orderProductsByClientId($clientId, $shopId) |
| 77 | 77 | { |
| 78 | - return $this->modelOrderProduct->with(array('product'))->whereHas('Order', function ($query) use ($clientId, $shopId) { |
|
| 78 | + return $this->modelOrderProduct->with(array('product'))->whereHas('Order', function($query) use ($clientId, $shopId) { |
|
| 79 | 79 | $query->where('client_id', '=', $clientId)->where('shop_id', '=', $shopId); |
| 80 | 80 | }); |
| 81 | 81 | } |
@@ -13,10 +13,10 @@ |
||
| 13 | 13 | |
| 14 | 14 | class OrderService extends BaseService |
| 15 | 15 | { |
| 16 | - public function __construct(OrderRepository $order) |
|
| 17 | - { |
|
| 18 | - $this->repo = $order; |
|
| 19 | - } |
|
| 16 | + public function __construct(OrderRepository $order) |
|
| 17 | + { |
|
| 18 | + $this->repo = $order; |
|
| 19 | + } |
|
| 20 | 20 | |
| 21 | 21 | public function createAddress(array $attributes, $orderId) |
| 22 | 22 | { |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | { |
| 110 | 110 | $attributes['shop_id'] = $shopId; |
| 111 | 111 | $attributes['client_id'] = $attributes['user_id']; |
| 112 | - $client = ClientService::selectOneByShopIdAndId($shopId, $attributes['user_id']); |
|
| 112 | + $client = ClientService::selectOneByShopIdAndId($shopId, $attributes['user_id']); |
|
| 113 | 113 | |
| 114 | 114 | $this->repo->getModel()->fill($attributes); |
| 115 | 115 | $this->repo->getModel()->save(); |