Passed
Push — master ( d7fff5...b4538b )
by Matthijs
06:20
created
app/Http/Controllers/Backend/ProductImageController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 {
19 19
     public function index(Request $request, $productId)
20 20
     {
21
-           $product = ProductService::find($productId);
21
+            $product = ProductService::find($productId);
22 22
         if ($request->wantsJson()) {
23 23
 
24 24
             $query = ProductService::getImageModel()->where('product_id', '=', $productId);
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
                 foreach ($newProductAttributes as $key => $productAttribute) {
97 97
                     $newArray = array();
98 98
                     foreach ($productAttribute as $keyNew => $valueNew) {
99
-                         $newArray[] = $keyNew.': '.$valueNew['value'];
100
-                         $attributesList[$valueNew['id']] = $valueNew['value'];
99
+                            $newArray[] = $keyNew.': '.$valueNew['value'];
100
+                            $attributesList[$valueNew['id']] = $valueNew['value'];
101 101
                     }
102 102
                     $productAttributesList[$key] = implode(', ', $newArray);
103 103
                 }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
             $query = ProductService::getImageModel()->where('product_id', '=', $productId);
25 25
             
26 26
             $datatables = \DataTables::of($query)
27
-            ->addColumn('thumb', function ($query) use ($productId) {
27
+            ->addColumn('thumb', function($query) use ($productId) {
28 28
                 return '<img src="/files/product/100x100/'.$query->product_id.'/'.$query->file.'"  />';
29 29
             })
30 30
 
31
-            ->addColumn('action', function ($query) use ($productId) {
31
+            ->addColumn('action', function($query) use ($productId) {
32 32
                 $deleteLink = \Form::deleteajax(url()->route('product.images.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
33 33
                 $links = '<a href="'.url()->route('product.images.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
34 34
             
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
     public function store(Request $request, $productId)
52 52
     {
53
-        $result  = ProductService::createImage($request->all(), $productId);
53
+        $result = ProductService::createImage($request->all(), $productId);
54 54
         return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was inserted.');
55 55
     }
56 56
 
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
 
65 65
         if ($productImage->relatedProductAttributes->count()) {
66 66
             foreach ($productImage->relatedProductAttributes as $row) {
67
-                $selectedProductAttributes[] =  $row->pivot->product_attribute_id;
67
+                $selectedProductAttributes[] = $row->pivot->product_attribute_id;
68 68
             }
69 69
         }
70 70
 
71 71
         if ($productImage->relatedAttributes->count()) {
72 72
             foreach ($productImage->relatedAttributes as $row) {
73
-                $selectedAttributes[] =  $row->pivot->attribute_id;
73
+                $selectedAttributes[] = $row->pivot->attribute_id;
74 74
             }
75 75
         }
76 76
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
     public function generateAttributeLists($product)
81 81
     {
82
-        $productAttributes =         $product->attributes;
82
+        $productAttributes = $product->attributes;
83 83
         $newProductAttributes = array();
84 84
         $attributesList = array();
85 85
         $productAttributesList = array();
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 
110 110
     public function update(Request $request, $productId, $productImageId)
111 111
     {
112
-        $result  = ProductService::updateImageById($request->all(), $productId, $productImageId);
112
+        $result = ProductService::updateImageById($request->all(), $productId, $productImageId);
113 113
         return ProductService::notificationRedirect(array('product.images.index', $productId), $result, 'The product image was update.');
114 114
     }
115 115
 
116 116
     public function destroy($productId, $productImageId)
117 117
     {
118
-        $result  = ProductService::destroyImage($productImageId);
118
+        $result = ProductService::destroyImage($productImageId);
119 119
 
120 120
         if ($result) {
121 121
             Notification::success('The product image is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ClientAddressController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
             })
49 49
             ->addColumn('bill', function ($addresses) {
50 50
                 if ($addresses->clientBillAddress()->count()) {
51
-                          return '<span class="glyphicon glyphicon-ok icon-green"></span>';
51
+                            return '<span class="glyphicon glyphicon-ok icon-green"></span>';
52 52
                 }
53 53
 
54 54
                 return '<span class="glyphicon glyphicon-remove icon-red"></span>';
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,24 +27,24 @@  discard block
 block discarded – undo
27 27
             $addresses = ClientService::getAddressModel()->with(array('clientDeliveryAddress', 'clientBillAddress'))->where('client_id', '=', $clientId);
28 28
             
29 29
             $datatables = DataTables::of($addresses)
30
-            ->addColumn('housenumber', function ($addresses) {
30
+            ->addColumn('housenumber', function($addresses) {
31 31
                 return $addresses->housenumber.$addresses->housenumber_suffix;
32 32
             })
33
-            ->addColumn('delivery', function ($addresses) {
33
+            ->addColumn('delivery', function($addresses) {
34 34
                 if ($addresses->clientDeliveryAddress()->count()) {
35 35
                     return '<span class="glyphicon glyphicon-ok icon-green"></span>';
36 36
                 }
37 37
                 
38 38
                 return '<span class="glyphicon glyphicon-remove icon-red"></span>';   
39 39
             })
40
-            ->addColumn('bill', function ($addresses) {
40
+            ->addColumn('bill', function($addresses) {
41 41
                 if ($addresses->clientBillAddress()->count()) {
42 42
                           return '<span class="glyphicon glyphicon-ok icon-green"></span>';
43 43
                 }
44 44
 
45 45
                 return '<span class="glyphicon glyphicon-remove icon-red"></span>';
46 46
             })
47
-            ->addColumn('action', function ($addresses) use ($clientId) {
47
+            ->addColumn('action', function($addresses) use ($clientId) {
48 48
                 $deleteLink = Form::deleteajax(url()->route('client.addresses.destroy', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
49 49
                 $links = '<a href="'.url()->route('client.addresses.edit', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
50 50
             
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function store(Request $request, $clientId)
67 67
     {
68
-        $result  = ClientService::createAddress($request->all(), $clientId);
68
+        $result = ClientService::createAddress($request->all(), $clientId);
69 69
         return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is inserted.');
70 70
     }
71 71
 
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function update(Request $request, $clientId, $id)
79 79
     {
80
-        $result  = ClientService::editAddress($clientId, $id, $request->all());
80
+        $result = ClientService::editAddress($clientId, $id, $request->all());
81 81
         return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is updated.'); 
82 82
     }
83 83
 
84 84
     public function destroy($clientId, $id)
85 85
     {
86
-        $result  = ClientService::destroyAddress($id);
86
+        $result = ClientService::destroyAddress($id);
87 87
 
88 88
         if ($result) {
89 89
             Notification::success('The client address is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/InvoiceController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
             
42 42
             
43 43
             $datatables = \DataTables::of($invoice)
44
-            ->addColumn('price_with_tax', function ($order) {
44
+            ->addColumn('price_with_tax', function($order) {
45 45
                 $money = '&euro; '.$order->price_with_tax;
46 46
                 return $money;
47 47
             })
48
-            ->addColumn('action', function ($invoice) {
49
-                $deleteLink = \Form::deleteajax('/invoice/'. $invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
48
+            ->addColumn('action', function($invoice) {
49
+                $deleteLink = \Form::deleteajax('/invoice/'.$invoice->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
50 50
                 $download = '<a href="/invoice/'.$invoice->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a>  ';
51 51
                 $links = '<a href="/invoice/'.$invoice->id.'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a>  '.$download;
52 52
             
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     public function store()
84 84
     {
85
-        $result  = $this->invoice->create(Request::all());
85
+        $result = $this->invoice->create(Request::all());
86 86
 
87 87
         if (isset($result->id)) {
88 88
             \Notification::success('The invoice was inserted.');
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 
105 105
     public function update($invoiceId)
106 106
     {
107
-        $result  = $this->invoice->updateById(Request::all(), $invoiceId);
107
+        $result = $this->invoice->updateById(Request::all(), $invoiceId);
108 108
 
109 109
         if (isset($result->id)) {
110 110
             \Notification::success('The invoice was updated.');
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
     public function destroy($invoiceId)
119 119
     {
120
-        $result  = $this->invoice->destroy($invoiceId);
120
+        $result = $this->invoice->destroy($invoiceId);
121 121
 
122 122
         if ($result) {
123 123
             Notification::success('The invoice was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/CouponGroupController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
             $query = CouponService::getGroupModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
25 25
 
26 26
             $datatables = \DataTables::of($query)
27
-            ->addColumn('action', function ($query) {
27
+            ->addColumn('action', function($query) {
28 28
                 $deleteLink = Form::deleteajax(url()->route('coupon-group.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'));
29 29
                 $links = '<a href="'.url()->route('coupon-group.edit', $query->id).'" class="btn btn-sm btn-success"><i class="fi-pencil"></i>Edit</a>  '.$deleteLink;
30 30
                 return $links;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function store(Request $request)
45 45
     {
46
-        $result  = CouponService::createGroup($request->all());
46
+        $result = CouponService::createGroup($request->all());
47 47
         return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was inserted.');
48 48
     }
49 49
 
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function update(Request $request, $couponGroupId)
56 56
     {
57
-        $result  = CouponService::updateGroupById($request->all(), $couponGroupId);
57
+        $result = CouponService::updateGroupById($request->all(), $couponGroupId);
58 58
         return CouponService::notificationRedirect('coupon-group.index', $result, 'The coupon group was updated.');
59 59
     }
60 60
 
61 61
     public function destroy($couponGroupId)
62 62
     {
63
-        $result  = CouponService::destroyGroup($couponGroupId);
63
+        $result = CouponService::destroyGroup($couponGroupId);
64 64
 
65 65
         if ($result) {
66 66
             Notification::success('The coupon was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ContentImageController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@  discard block
 block discarded – undo
31 31
             
32 32
             $datatables = DataTables::of($image)
33 33
 
34
-            ->addColumn('thumb', function ($image) {
34
+            ->addColumn('thumb', function($image) {
35 35
                 return '<img src="/files/content/100x100/'.$image->content_id.'/'.$image->file.'"  />';
36 36
             })
37
-            ->addColumn('action', function ($image) use ($contentId) {
38
-                $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'. $image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
37
+            ->addColumn('action', function($image) use ($contentId) {
38
+                $deleteLink = Form::deleteajax('/admin/content/'.$contentId.'/images/'.$image->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
39 39
                 $links = '<a href="/admin/content/'.$contentId.'/images/'.$image->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
40 40
 
41 41
                 return $links;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function store(Request $request, $contentId)
57 57
     {
58
-        $result  = ContentService::createImage($request->all(), $contentId);
58
+        $result = ContentService::createImage($request->all(), $contentId);
59 59
         return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was inserted.');
60 60
     }
61 61
 
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function update(Request $request, $contentId, $contentImageId)
69 69
     {
70
-        $result  = ContentService::updateImageById($request->all(), $contentId, $contentImageId);
70
+        $result = ContentService::updateImageById($request->all(), $contentId, $contentImageId);
71 71
         return ContentService::notificationRedirect(array('content.{contentId}.images.index', $contentId), $result, 'The content image was updated.');
72 72
     }
73 73
 
74 74
     public function destroy($contentId, $contentImageId)
75 75
     {
76
-        $result  = ContentService::destroyImage($contentImageId);
76
+        $result = ContentService::destroyImage($contentImageId);
77 77
 
78 78
         if ($result) {
79 79
             Notification::success('The file was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/NewsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
             ->with(array('newsGroup'))        ->leftJoin(NewsService::getGroupModel()->getTable(), NewsService::getGroupModel()->getTable().'.id', '=', 'news_group_id');
32 32
             
33 33
             $datatables = DataTables::of($query)
34
-            ->filterColumn('title', function ($query, $keyword) {
34
+            ->filterColumn('title', function($query, $keyword) {
35 35
 
36 36
                 $query->where(
37
-                    function ($query) use ($keyword) {
37
+                    function($query) use ($keyword) {
38 38
                         $query->whereRaw("news.title like ?", ["%{$keyword}%"]);
39 39
                         ;
40 40
                     }
41 41
                 );
42 42
             })
43
-            ->addColumn('newsgroup', function ($query) {
43
+            ->addColumn('newsgroup', function($query) {
44 44
                 return $query->newstitle;
45 45
             })
46 46
 
47
-            ->addColumn('action', function ($query) {
47
+            ->addColumn('action', function($query) {
48 48
                 $deleteLink = Form::deleteajax(url()->route('news.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
49 49
                 $links = '<a href="'.url()->route('news.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
50 50
             
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function store(Request $request)
67 67
     {
68
-        $result  = NewsService::create($request->all());
68
+        $result = NewsService::create($request->all());
69 69
         return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.');
70 70
     }
71 71
 
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
     
91 91
     public function update(Request $request, $newsId)
92 92
     {
93
-        $result  = NewsService::updateById($request->all(), $newsId);
93
+        $result = NewsService::updateById($request->all(), $newsId);
94 94
         return NewsService::notificationRedirect('news.index', $result, 'The news item was inserted.');
95 95
     }
96 96
 
97 97
     public function destroy($newsId)
98 98
     {
99
-        $result  = NewsService::destroy($newsId);
99
+        $result = NewsService::destroy($newsId);
100 100
 
101 101
         if ($result) {
102 102
             Notification::success('The news was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/BrandImageController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
             
27 27
             $datatables = DataTables::of($image)
28 28
 
29
-            ->addColumn('thumb', function ($image) {
29
+            ->addColumn('thumb', function($image) {
30 30
                 return '<img src="'.config('hideyo.public_path').'/brand/100x100/'.$image->brand_id.'/'.$image->file.'"  />';
31 31
             })
32
-            ->addColumn('action', function ($image) use ($brandId) {
32
+            ->addColumn('action', function($image) use ($brandId) {
33 33
                 $deleteLink = Form::deleteajax(url()->route('brand.images.destroy', array('brandId' => $brandId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
34 34
                 $links = '<a href="'.url()->route('brand.images.edit', array('brandId' => $brandId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
35 35
                 return $links;
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             return $datatables->make(true);
39 39
         }
40 40
         
41
-        return view('backend.brand_image.index')->with(array( 'brand' => $brand));
41
+        return view('backend.brand_image.index')->with(array('brand' => $brand));
42 42
     }
43 43
 
44 44
     public function create($brandId)
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function store(Request $request, $brandId)
51 51
     {
52
-        $result  = BrandService::createImage($request->all(), $brandId);
52
+        $result = BrandService::createImage($request->all(), $brandId);
53 53
         return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was inserted.');
54 54
     }
55 55
 
@@ -61,13 +61,13 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function update(Request $request, $brandId, $brandImageId)
63 63
     {
64
-        $result  = BrandService::updateImageById($request->all(), $brandId, $brandImageId);
64
+        $result = BrandService::updateImageById($request->all(), $brandId, $brandImageId);
65 65
         return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was updated.');
66 66
     }
67 67
 
68 68
     public function destroy($brandId, $brandImageId)
69 69
     {
70
-        $result  = BrandService::destroyImage($brandImageId);
70
+        $result = BrandService::destroyImage($brandImageId);
71 71
 
72 72
         if ($result) {
73 73
             Notification::success('The file was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/UserController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
     public function index()
24 24
     {
25 25
         if (Request::wantsJson()) {
26
-            $query = UserService::getModel()->select(['id','email', 'username']);
27
-            $datatables = \DataTables::of($query)->addColumn('action', function ($query) {
26
+            $query = UserService::getModel()->select(['id', 'email', 'username']);
27
+            $datatables = \DataTables::of($query)->addColumn('action', function($query) {
28 28
                 $deleteLink = \Form::deleteajax(url()->route('user.destroy', $query->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
29 29
                 $links = '<a href="'.url()->route('user.edit', $query->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
30 30
             
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function store()
47 47
     {
48
-        $result  = UserService::signup(Request::all());
48
+        $result = UserService::signup(Request::all());
49 49
         return UserService::notificationRedirect('user.index', $result, 'The user was inserted.');
50 50
     }
51 51
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         }
74 74
 
75 75
         $shop = ShopService::find($shopId);
76
-        $result  = UserService::updateShopProfileById($shop, $id);
76
+        $result = UserService::updateShopProfileById($shop, $id);
77 77
         Notification::success('The shop changed.');
78 78
         return redirect()->route('shop.index');
79 79
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             $id = auth()->id();
85 85
         }
86 86
 
87
-        $result  = UserService::updateProfileById(Request::all(), Request::file('avatar'), $id);
87
+        $result = UserService::updateProfileById(Request::all(), Request::file('avatar'), $id);
88 88
         return UserService::notificationRedirect('user.index', $result, 'The user was updated.');
89 89
     }
90 90
 
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 
107 107
     public function update($id)
108 108
     {
109
-        $result  = UserService::updateById(Request::all(), Request::file('avatar'), $id);
109
+        $result = UserService::updateById(Request::all(), Request::file('avatar'), $id);
110 110
         return UserService::notificationRedirect('user.index', $result, 'The user was updated.');
111 111
     }
112 112
 
113 113
     public function destroy($id)
114 114
     {
115
-        $result  = UserService::destroy($id);
115
+        $result = UserService::destroy($id);
116 116
 
117 117
         if ($result) {
118 118
             Notification::success('The user was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductCombinationController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -26,23 +26,23 @@  discard block
 block discarded – undo
26 26
     {
27 27
         $product = ProductService::find($productId);
28 28
 
29
-        if($product) {
29
+        if ($product) {
30 30
             if ($request->wantsJson()) {
31 31
 
32 32
                 $query = ProductCombinationService::getModel()->where('product_id', '=', $productId);
33 33
 
34
-                $datatables = \DataTables::of($query)->addColumn('action', function ($query) use ($productId) {
34
+                $datatables = \DataTables::of($query)->addColumn('action', function($query) use ($productId) {
35 35
                     $deleteLink = \Form::deleteajax(url()->route('product-combination.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
36 36
                     $links = '<a href="'.url()->route('product-combination.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
37 37
                 
38 38
                     return $links;
39 39
                 })
40 40
 
41
-                ->addColumn('amount', function ($query) {
41
+                ->addColumn('amount', function($query) {
42 42
                     return '<input type="text" class="change-amount-product-attribute" value="'.$query->amount.'" data-url="/admin/product/'.$query->product_id.'/product-combination/change-amount-attribute/'.$query->id.'">';
43 43
                 })
44 44
 
45
-                ->addColumn('price', function ($query) {
45
+                ->addColumn('price', function($query) {
46 46
                     $result = 0;
47 47
                     if ($query->price) {
48 48
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                             'amount' => $query->amount
92 92
                             );
93 93
 
94
-                        $result =  '&euro; '.$output['orginal_price_ex_tax_number_format'].' / &euro; '.$output['orginal_price_inc_tax_number_format'];
94
+                        $result = '&euro; '.$output['orginal_price_ex_tax_number_format'].' / &euro; '.$output['orginal_price_inc_tax_number_format'];
95 95
 
96 96
 
97 97
                         if ($query->discount_value) {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                     return $result;
103 103
                 })
104 104
 
105
-                ->addColumn('combinations', function ($query) use ($productId) {
105
+                ->addColumn('combinations', function($query) use ($productId) {
106 106
                     $items = array();
107 107
                     foreach ($query->combinations as $row) {
108 108
                         $items[] = $row->attribute->attributeGroup->title.': '.$row->attribute->value;
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
 
148 148
     public function store(Request $request, $productId)
149 149
     {
150
-        $result  = ProductCombinationService::create($request->all(), $productId);
151
-        if($result) {
150
+        $result = ProductCombinationService::create($request->all(), $productId);
151
+        if ($result) {
152 152
             return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product extra fields are updated.');
153 153
         }
154 154
 
@@ -184,14 +184,14 @@  discard block
 block discarded – undo
184 184
     public function update(Request $request, $productId, $id)
185 185
     {
186 186
 
187
-        $result  = ProductCombinationService::updateById($request->all(), $productId, $id);
187
+        $result = ProductCombinationService::updateById($request->all(), $productId, $id);
188 188
         return ProductCombinationService::notificationRedirect(array('product-combination.index', $productId), $result, 'The product combinations are updated.');
189 189
 
190 190
     }
191 191
 
192 192
     public function destroy($productId, $id)
193 193
     {
194
-        $result  = ProductCombinationService::destroy($id);
194
+        $result = ProductCombinationService::destroy($id);
195 195
 
196 196
         if ($result) {
197 197
             Notification::success('The product combination is deleted.');
Please login to merge, or discard this patch.