@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | public function selectAllByClientId($clientId) |
20 | 20 | { |
21 | - return $this->model->where('client_id', '=', $clientId)->get(); |
|
21 | + return $this->model->where('client_id', '=', $clientId)->get(); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | public function selectOneByClientIdAndId($clientId, $id) |
@@ -10,11 +10,11 @@ discard block |
||
10 | 10 | |
11 | 11 | class AttributeService extends BaseService |
12 | 12 | { |
13 | - public function __construct(AttributeRepository $attribute, AttributeGroupRepository $attributeGroup) |
|
14 | - { |
|
15 | - $this->repo = $attribute; |
|
16 | - $this->repoGroup = $attributeGroup; |
|
17 | - } |
|
13 | + public function __construct(AttributeRepository $attribute, AttributeGroupRepository $attributeGroup) |
|
14 | + { |
|
15 | + $this->repo = $attribute; |
|
16 | + $this->repoGroup = $attributeGroup; |
|
17 | + } |
|
18 | 18 | |
19 | 19 | private function rules($id = false) |
20 | 20 | { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $attributes['shop_id'] = auth('hideyobackend')->user()->selected_shop_id; |
48 | 48 | $attributes['modified_by_user_id'] = auth('hideyobackend')->user()->id; |
49 | - $attributes['attribute_group_id'] = $attributeGroupId; |
|
49 | + $attributes['attribute_group_id'] = $attributeGroupId; |
|
50 | 50 | |
51 | 51 | $validator = Validator::make($attributes, $this->rules()); |
52 | 52 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | ); |
37 | 37 | |
38 | 38 | if ($id) { |
39 | - $rules['title'] = $rules['title'].','.$id.' = id'; |
|
39 | + $rules['title'] = $rules['title'].','.$id.' = id'; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | return $rules; |
@@ -10,13 +10,13 @@ |
||
10 | 10 | |
11 | 11 | class ProductAmountSeriesService extends BaseService |
12 | 12 | { |
13 | - public function __construct(ProductAmountSeriesRepository $productAmountSeries) |
|
14 | - { |
|
15 | - $this->repo = $productAmountSeries; |
|
16 | - } |
|
13 | + public function __construct(ProductAmountSeriesRepository $productAmountSeries) |
|
14 | + { |
|
15 | + $this->repo = $productAmountSeries; |
|
16 | + } |
|
17 | 17 | |
18 | 18 | |
19 | - /** |
|
19 | + /** |
|
20 | 20 | * The validation rules for the model. |
21 | 21 | * |
22 | 22 | * @param integer $id id attribute model |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | |
25 | 25 | $storageImagePath = "/files/product/"; |
26 | - $publicImagePath = public_path() .config('hideyo.public_path'). "/product/"; |
|
26 | + $publicImagePath = public_path().config('hideyo.public_path')."/product/"; |
|
27 | 27 | |
28 | 28 | |
29 | 29 | $productCategory = ProductCategory::where('title', '=', 'Pants')->first(); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $product2->product_category_id = $productCategory->id; |
133 | 133 | $product2->tax_rate_id = $taxRate->id; |
134 | 134 | |
135 | - if (! $product2->save()) { |
|
135 | + if (!$product2->save()) { |
|
136 | 136 | \Log::info('Unable to create product '.$product2->title, (array)$product2->errors()); |
137 | 137 | } else { |
138 | 138 | \Log::info('Created product "'.$product2->title.'" <'.$product2->title.'>'); |
@@ -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(); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | { |
17 | 17 | $shop = ShopService::checkByUrl($request->root()); |
18 | 18 | |
19 | - if(!$shop) { |
|
19 | + if (!$shop) { |
|
20 | 20 | abort(404, "shop cannot be found"); |
21 | 21 | } |
22 | 22 |