@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | if (env('APP_ENV') != 'local') { |
| 25 | 25 | URL::forceScheme('https'); |
| 26 | - } |
|
| 26 | + } |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | */ |
| 227 | 227 | public function saveProductImages(Collection $collection) |
| 228 | 228 | { |
| 229 | - $collection->each(function (UploadedFile $file) { |
|
| 229 | + $collection->each(function(UploadedFile $file) { |
|
| 230 | 230 | $filename = $this->storeFile($file); |
| 231 | 231 | $productImage = new ProductImage([ |
| 232 | 232 | 'product_id' => $this->model->id, |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | */ |
| 280 | 280 | public function saveCombination(ProductAttribute $productAttribute, AttributeValue ...$attributeValues) : Collection |
| 281 | 281 | { |
| 282 | - return collect($attributeValues)->each(function (AttributeValue $value) use ($productAttribute) { |
|
| 282 | + return collect($attributeValues)->each(function(AttributeValue $value) use ($productAttribute) { |
|
| 283 | 283 | return $productAttribute->attributesValues()->save($value); |
| 284 | 284 | }); |
| 285 | 285 | } |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | */ |
| 290 | 290 | public function listCombinations() : Collection |
| 291 | 291 | { |
| 292 | - return $this->model->attributes()->map(function (ProductAttribute $productAttribute) { |
|
| 292 | + return $this->model->attributes()->map(function(ProductAttribute $productAttribute) { |
|
| 293 | 293 | return $productAttribute->attributesValues; |
| 294 | 294 | }); |
| 295 | 295 | } |
@@ -302,11 +302,11 @@ discard block |
||
| 302 | 302 | { |
| 303 | 303 | $values = $productAttribute->attributesValues()->get(); |
| 304 | 304 | |
| 305 | - return $values->map(function (AttributeValue $attributeValue) { |
|
| 305 | + return $values->map(function(AttributeValue $attributeValue) { |
|
| 306 | 306 | return $attributeValue; |
| 307 | - })->keyBy(function (AttributeValue $item) { |
|
| 307 | + })->keyBy(function(AttributeValue $item) { |
|
| 308 | 308 | return strtolower($item->attribute->name); |
| 309 | - })->transform(function (AttributeValue $value) { |
|
| 309 | + })->transform(function(AttributeValue $value) { |
|
| 310 | 310 | return $value->value; |
| 311 | 311 | }); |
| 312 | 312 | } |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | return $this->model->brand; |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - public function countProducts(){ |
|
| 330 | + public function countProducts() { |
|
| 331 | 331 | return Product::count(); |
| 332 | 332 | } |
| 333 | 333 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | |
| 61 | 61 | $rate_id = $request->input('rate'); |
| 62 | 62 | $rates = $shippingRepo->getRates($request->input('shipment_obj_id')); |
| 63 | - $rate = collect($rates->results)->filter(function ($rate) use ($rate_id) { |
|
| 63 | + $rate = collect($rates->results)->filter(function($rate) use ($rate_id) { |
|
| 64 | 64 | return $rate->object_id == $rate_id; |
| 65 | 65 | })->first(); |
| 66 | 66 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | $transaction = Shippo_Transaction::create($details); |
| 136 | 136 | |
| 137 | - if ($transaction['status'] != 'SUCCESS'){ |
|
| 137 | + if ($transaction['status'] != 'SUCCESS') { |
|
| 138 | 138 | Log::error($transaction['messages']); |
| 139 | 139 | return redirect()->route('checkout.index')->with('error', 'There is an error in the shipment details. Check logs.'); |
| 140 | 140 | } |
@@ -27,6 +27,6 @@ |
||
| 27 | 27 | { |
| 28 | 28 | $cats = $this->categoryRepo->all(); |
| 29 | 29 | |
| 30 | - return view('front.index')->with('cats',$cats); |
|
| 30 | + return view('front.index')->with('cats', $cats); |
|
| 31 | 31 | } |
| 32 | 32 | } |