Passed
Push — master ( c33b65...7ac5c5 )
by Matthijs
06:34
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/ProductRelatedProductController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
             $query = ProductRelatedProductService::getModel()->where('product_id', '=', $productId);
28 28
             
29 29
             $datatables = \Datatables::of($query)
30
-                ->addColumn('related', function ($query) use ($productId) {
30
+                ->addColumn('related', function($query) use ($productId) {
31 31
                     return $query->RelatedProduct->title;
32 32
                 })
33
-                ->addColumn('product', function ($query) use ($productId) {
33
+                ->addColumn('product', function($query) use ($productId) {
34 34
                     return $query->Product->title;
35 35
                 })
36
-                ->addColumn('action', function ($query) use ($productId) {
36
+                ->addColumn('action', function($query) use ($productId) {
37 37
                     $deleteLink = \Form::deleteajax(url()->route('product.related-product.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
38 38
                     
39 39
                     return $deleteLink;
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
     
56 56
     public function store(Request $request, $productId)
57 57
     {
58
-        $result  = ProductRelatedProductService::create($request->all(), $productId);
58
+        $result = ProductRelatedProductService::create($request->all(), $productId);
59 59
         return redirect()->route('product.related-product.index', $productId);
60 60
     }
61 61
 
62 62
     public function destroy($productId, $productRelatedProductId)
63 63
     {
64
-        $result  = ProductRelatedProductService::destroy($productRelatedProductId);
64
+        $result = ProductRelatedProductService::destroy($productRelatedProductId);
65 65
 
66 66
         if ($result) {
67 67
             Notification::success('The related product 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/NewsImageController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
             
30 30
             $datatables = Datatables::of($image)
31 31
 
32
-            ->addColumn('thumb', function ($image) {
32
+            ->addColumn('thumb', function($image) {
33 33
                 return '<img src="/files/news/100x100/'.$image->news_id.'/'.$image->file.'"  />';
34 34
             })
35
-            ->addColumn('action', function ($image) use ($newsId) {
35
+            ->addColumn('action', function($image) use ($newsId) {
36 36
                 $deleteLink = Form::deleteajax(url()->route('news-images.destroy', array('newsId' => $newsId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
37 37
                 $links = '<a href="'.url()->route('news-images.edit', array('newsId' => $newsId, 'id' => $image->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
38 38
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
     public function store(Request $request, $newsId)
55 55
     {
56
-        $result  = NewsService::createImage($request->all(), $newsId);
56
+        $result = NewsService::createImage($request->all(), $newsId);
57 57
         return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was inserted.');
58 58
     }
59 59
 
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function update(Request $request, $newsId, $newsImageId)
67 67
     {
68
-        $result  = NewsService::updateImageById($request->all(), $newsId, $newsImageId);
68
+        $result = NewsService::updateImageById($request->all(), $newsId, $newsImageId);
69 69
         return NewsService::notificationRedirect(array('news-images.index', $newsId), $result, 'The news image was updated.');
70 70
     }
71 71
 
72 72
     public function destroy($newsId, $newsImageId)
73 73
     {
74
-        $result  = NewsService::destroyImage($newsImageId);
74
+        $result = NewsService::destroyImage($newsImageId);
75 75
 
76 76
         if ($result) {
77 77
             Notification::success('The file 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/ClientController.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
             $clients = ClientService::getModel()->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
29 29
             
30 30
             $datatables = Datatables::of($clients)
31
-            ->addColumn('last_login', function ($clients) {
31
+            ->addColumn('last_login', function($clients) {
32 32
                 return date('d F H:i', strtotime($clients->last_login));
33 33
             })
34
-            ->addColumn('action', function ($clients) {
34
+            ->addColumn('action', function($clients) {
35 35
                 $deleteLink = Form::deleteajax(url()->route('client.destroy', $clients->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
36 36
                 $links = '<a href="'.url()->route('client.edit', $clients->id).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Show</a>  '.$deleteLink;
37 37
             
@@ -68,10 +68,10 @@  discard block
 block discarded – undo
68 68
     public function postActivate(Request $request, $clientId)
69 69
     {
70 70
         $input = $request->all();
71
-        $result  = ClientService::activate($clientId);
71
+        $result = ClientService::activate($clientId);
72 72
 
73 73
         if ($input['send_mail']) {
74
-                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
74
+                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
75 75
                     $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
76 76
                 });
77 77
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
     public function store(Request $request)
93 93
     {
94
-        $result  = ClientService::create($request->all());
94
+        $result = ClientService::create($request->all());
95 95
         return ClientService::notificationRedirect('client.index', $result, 'The client was inserted.');
96 96
     }
97 97
 
@@ -122,24 +122,24 @@  discard block
 block discarded – undo
122 122
 
123 123
     public function postExport()
124 124
     {
125
-        $result  =  ClientService::selectAllExport();
126
-        Excel::create('export', function ($excel) use ($result) {
125
+        $result = ClientService::selectAllExport();
126
+        Excel::create('export', function($excel) use ($result) {
127 127
 
128
-            $excel->sheet('Clients', function ($sheet) use ($result) {
128
+            $excel->sheet('Clients', function($sheet) use ($result) {
129 129
                 $newArray = array();
130 130
                 foreach ($result as $row) {
131 131
                     $firstname = null;
132
-                    if($row->clientBillAddress) {
132
+                    if ($row->clientBillAddress) {
133 133
                         $firstname = $row->clientBillAddress->firstname;
134 134
                     }
135 135
 
136 136
                     $lastname = null;
137
-                    if($row->clientBillAddress) {
137
+                    if ($row->clientBillAddress) {
138 138
                         $lastname = $row->clientBillAddress->lastname;
139 139
                     }
140 140
 
141 141
                     $gender = null;
142
-                    if($row->clientBillAddress) {
142
+                    if ($row->clientBillAddress) {
143 143
                         $gender = $row->clientBillAddress->gender;
144 144
                     }
145 145
 
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
 
164 164
     public function update(Request $request, $clientId)
165 165
     {
166
-        $result  = ClientService::updateById($request->all(), $clientId);
166
+        $result = ClientService::updateById($request->all(), $clientId);
167 167
         $input = $request->all();
168 168
         if (isset($result->id)) {
169 169
             if ($result->active) {
170 170
                 if ($input['send_mail']) {
171
-                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
171
+                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
172 172
                         $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
173 173
                     });
174 174
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 
190 190
     public function destroy($clientId)
191 191
     {
192
-        $result  = ClientService::destroy($clientId);
192
+        $result = ClientService::destroy($clientId);
193 193
 
194 194
         if ($result) {
195 195
             Notification::success('The client was deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ErrorController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 
22 22
             $query = $this->error->getModel();
23 23
             
24
-            $datatables = \Datatables::of($query)->addColumn('action', function ($query) {
25
-                $deleteLink = \Form::deleteajax('/admin/general-setting/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
24
+            $datatables = \Datatables::of($query)->addColumn('action', function($query) {
25
+                $deleteLink = \Form::deleteajax('/admin/general-setting/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
26 26
                 $links = '<a href="/admin/general-setting/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
27 27
             
28 28
                 return $links;
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductCategoryController.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
             
28 28
             $datatables = Datatables::of($productCategory)
29 29
 
30
-            ->addColumn('image', function ($productCategory) {
30
+            ->addColumn('image', function($productCategory) {
31 31
                 if ($productCategory->productCategoryImages->count()) {
32 32
                     return '<img src="/files/product_category/100x100/'.$productCategory->id.'/'.$productCategory->productCategoryImages->first()->file.'"  />';
33 33
                 }
34 34
             })
35 35
 
36
-            ->addColumn('title', function ($productCategory) {
36
+            ->addColumn('title', function($productCategory) {
37 37
 
38 38
                 $categoryTitle = $productCategory->title;
39 39
                 if ($productCategory->refProductCategory) {
@@ -47,17 +47,17 @@  discard block
 block discarded – undo
47 47
                 return $categoryTitle;
48 48
             })
49 49
 
50
-            ->addColumn('products', function ($productCategory) {
50
+            ->addColumn('products', function($productCategory) {
51 51
                 return $productCategory->products->count();
52 52
             })
53
-            ->addColumn('parent', function ($productCategory) {
53
+            ->addColumn('parent', function($productCategory) {
54 54
              
55 55
                 if ($productCategory->parent()->count()) {
56 56
                     return $productCategory->parent()->first()->title;
57 57
                 }
58 58
             })
59 59
 
60
-            ->addColumn('active', function ($product) {
60
+            ->addColumn('active', function($product) {
61 61
                 if ($product->active) {
62 62
                     return '<a href="#" class="change-active" data-url="/admin/product-category/change-active/'.$product->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
63 63
                 }
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
             })
67 67
 
68 68
 
69
-            ->addColumn('seo', function ($productCategory) {
69
+            ->addColumn('seo', function($productCategory) {
70 70
                 if ($productCategory->meta_title && $productCategory->meta_description) {
71 71
                     return '<i class="fa fa-check"></i>';
72 72
                 }
73 73
             })
74
-            ->addColumn('action', function ($productCategory) {
74
+            ->addColumn('action', function($productCategory) {
75 75
                 $deleteLink = Form::deleteajax(url()->route('product-category.destroy', $productCategory->id), 'Delete', '', array('class'=>'btn btn-sm btn-danger'), $productCategory->title);
76 76
                 $links = '<a href="'.url()->route('product-category.edit', $productCategory->id).'" class="btn btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
77 77
             
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
     public function store(Request $request)
134 134
     {
135
-        $result  = ProductCategoryService::create($this->generateInput($request->all()));
135
+        $result = ProductCategoryService::create($this->generateInput($request->all()));
136 136
         return ProductCategoryService::notificationRedirect('product-category.index', $result, 'The product category was inserted.');
137 137
     }
138 138
 
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
 
155 155
     public function update(Request $request, $productCategoryId)
156 156
     {
157
-        $result  = ProductCategoryService::updateById($this->generateInput($request->all()), $productCategoryId);
157
+        $result = ProductCategoryService::updateById($this->generateInput($request->all()), $productCategoryId);
158 158
         return ProductCategoryService::notificationRedirect('product-category.index', $result, 'The product category was updated.');
159 159
     }
160 160
 
161 161
     public function destroy($productCategoryId)
162 162
     {
163
-        $result  = ProductCategoryService::destroy($productCategoryId);
163
+        $result = ProductCategoryService::destroy($productCategoryId);
164 164
 
165 165
         if ($result) {
166 166
             Notification::success('Category was deleted.');
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             } elseif ($parent->children()->count()) {
231 231
                 $node->makeLastChildOf($parent);
232 232
                 foreach ($parent->children()->get() as $key => $row) {
233
-                    $positionKey =  $position - 1;
233
+                    $positionKey = $position - 1;
234 234
                     if ($key == $positionKey) {
235 235
                         $node->moveToRightOf($row);
236 236
                     }
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/ProductAmountSeriesController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,14 +26,14 @@  discard block
 block discarded – undo
26 26
             
27 27
             $datatables = Datatables::of($query)
28 28
 
29
-            ->addColumn('active', function ($query) {
29
+            ->addColumn('active', function($query) {
30 30
                 if ($query->active) {
31 31
                     return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-ok icon-green"></span></a>';
32 32
                 }
33 33
                 
34 34
                 return '<a href="#" class="change-active" data-url="/admin/html-block/change-active/'.$query->id.'"><span class="glyphicon glyphicon-remove icon-red"></span></a>';
35 35
             })
36
-            ->addColumn('action', function ($query) use ($productId) {
36
+            ->addColumn('action', function($query) use ($productId) {
37 37
                 $deleteLink = Form::deleteajax(url()->route('product.product-amount-series.destroy', array('productId' => $productId, 'id' => $query->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
38 38
                 $links = '<a href="'.url()->route('product.product-amount-series.edit', array('productId' => $productId, 'id' => $query->id)).'" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
39 39
                 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     public function store(Request $request, $productId)
51 51
     {
52
-        $result  = ProductAmountSeriesService::create($request->all(), $productId);
52
+        $result = ProductAmountSeriesService::create($request->all(), $productId);
53 53
         return ProductService::notificationRedirect(array('product.product-amount-series.index', $productId), $result, 'The product amount series is inserted.');
54 54
     }
55 55
 
@@ -68,13 +68,13 @@  discard block
 block discarded – undo
68 68
 
69 69
     public function update(Request $request, $productId, $id)
70 70
     {
71
-        $result  = ProductAmountSeriesService::updateById($request->all(), $productId, $id);
71
+        $result = ProductAmountSeriesService::updateById($request->all(), $productId, $id);
72 72
         return ProductService::notificationRedirect(array('product.product-amount-series.index', $productId), $result, 'The product amount series is updated.');
73 73
     }
74 74
 
75 75
     public function destroy($productId, $id)
76 76
     {
77
-        $result  = ProductAmountSeriesService::destroy($id);
77
+        $result = ProductAmountSeriesService::destroy($id);
78 78
 
79 79
         if ($result) {
80 80
             Notification::success('The product amount series is deleted.');
Please login to merge, or discard this patch.