@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $list = $this->productRepo->searchProduct(request()->input('q')); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - $products = $list->map(function (Product $item) { |
|
| 82 | + $products = $list->map(function(Product $item) { |
|
| 83 | 83 | return $this->transformProduct($item); |
| 84 | 84 | })->all(); |
| 85 | 85 | |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $product = $this->productRepo->findProductById($id); |
| 152 | 152 | $productAttributes = $product->attributes()->get(); |
| 153 | 153 | |
| 154 | - $qty = $productAttributes->map(function ($item) { |
|
| 154 | + $qty = $productAttributes->map(function($item) { |
|
| 155 | 155 | return $item->quantity; |
| 156 | 156 | })->sum(); |
| 157 | 157 | |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | $productAttribute = $productRepo->saveProductAttributes(new ProductAttribute(compact('quantity', 'price'))); |
| 287 | 287 | |
| 288 | 288 | // save the combinations |
| 289 | - return collect($attributeValues)->each(function ($attributeId) use ($productRepo, $productAttribute) { |
|
| 289 | + return collect($attributeValues)->each(function($attributeId) use ($productRepo, $productAttribute) { |
|
| 290 | 290 | $attribute = $this->attributeValueRepository->find($attributeId); |
| 291 | 291 | return $productRepo->saveCombination($productAttribute, $attribute); |
| 292 | 292 | })->count(); |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $isCurrentUser = $this->employeeRepo->isAuthUser($employee); |
| 94 | 94 | |
| 95 | 95 | return view( |
| 96 | - 'admin.employees.edit', [ |
|
| 96 | + 'admin.employees.edit', [ |
|
| 97 | 97 | 'employee' => $employee, |
| 98 | 98 | 'allRoles' => $allRoles, |
| 99 | 99 | 'isCurrentUser' => $isCurrentUser, |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | |
| 123 | 123 | if ($request->has('roles') And !$isCurrentUser) { |
| 124 | 124 | $employee->roles()->sync($request->input('roles')); |
| 125 | - } else if(!$isCurrentUser){ |
|
| 125 | + } else if (!$isCurrentUser) { |
|
| 126 | 126 | $employee->roles()->detach($request->input('roles')); |
| 127 | 127 | } |
| 128 | 128 | |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | * @param string $sort |
| 28 | 28 | * @return Collection |
| 29 | 29 | */ |
| 30 | - public function listRoles(string $order = 'id', string $sort = 'desc') : Collection |
|
| 31 | - { |
|
| 32 | - return $this->all(['*'], $order, $sort); |
|
| 33 | - } |
|
| 30 | + public function listRoles(string $order = 'id', string $sort = 'desc') : Collection |
|
| 31 | + { |
|
| 32 | + return $this->all(['*'], $order, $sort); |
|
| 33 | + } |
|
| 34 | 34 | /** |
| 35 | 35 | * @param array $data |
| 36 | 36 | * @return Role |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | $isAuthUser = false; |
| 113 | 113 | if (Auth::guard('admin')->user()->id == $employee->id) |
| 114 | 114 | { |
| 115 | - $isAuthUser = true; |
|
| 115 | + $isAuthUser = true; |
|
| 116 | 116 | } |
| 117 | 117 | return $isAuthUser; |
| 118 | 118 | } |