Passed
Push — master ( 54235f...041fe5 )
by Matthijs
31:29 queued 24:13
created
app/Http/Controllers/Backend/ClientAddressController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,24 +36,24 @@  discard block
 block discarded – undo
36 36
             )->with(array('clientDeliveryAddress', 'clientBillAddress'))->where('client_id', '=', $clientId);
37 37
             
38 38
             $datatables = Datatables::of($addresses)
39
-            ->addColumn('housenumber', function ($addresses) {
39
+            ->addColumn('housenumber', function($addresses) {
40 40
                 return $addresses->housenumber.$addresses->housenumber_suffix;
41 41
             })
42
-            ->addColumn('delivery', function ($addresses) {
42
+            ->addColumn('delivery', function($addresses) {
43 43
                 if ($addresses->clientDeliveryAddress()->count()) {
44 44
                     return '<span class="glyphicon glyphicon-ok icon-green"></span>';
45 45
                 }
46 46
                 
47 47
                 return '<span class="glyphicon glyphicon-remove icon-red"></span>';   
48 48
             })
49
-            ->addColumn('bill', function ($addresses) {
49
+            ->addColumn('bill', function($addresses) {
50 50
                 if ($addresses->clientBillAddress()->count()) {
51 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>';
55 55
             })
56
-            ->addColumn('action', function ($addresses) use ($clientId) {
56
+            ->addColumn('action', function($addresses) use ($clientId) {
57 57
                 $deleteLink = Form::deleteajax(url()->route('client.addresses.destroy', array('clientId' => $clientId, 'clientAddressId' => $addresses->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
58 58
                 $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;
59 59
             
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function store(Request $request, $clientId)
76 76
     {
77
-        $result  = ClientService::createAddress($request->all(), $clientId);
77
+        $result = ClientService::createAddress($request->all(), $clientId);
78 78
         return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is inserted.');
79 79
     }
80 80
 
@@ -86,13 +86,13 @@  discard block
 block discarded – undo
86 86
 
87 87
     public function update(Request $request, $clientId, $id)
88 88
     {
89
-        $result  = ClientService::editAddress($clientId, $id, $request->all());
89
+        $result = ClientService::editAddress($clientId, $id, $request->all());
90 90
         return ClientService::notificationRedirect(array('client.addresses.index', $clientId), $result, 'The client adress is updated.'); 
91 91
     }
92 92
 
93 93
     public function destroy($clientId, $id)
94 94
     {
95
-        $result  = ClientService::destroyAddress($id);
95
+        $result = ClientService::destroyAddress($id);
96 96
 
97 97
         if ($result) {
98 98
             Notification::success('The client address is deleted.');
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/BrandImageController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,15 +23,15 @@  discard block
 block discarded – undo
23 23
         if ($request->wantsJson()) {
24 24
 
25 25
             $image = BrandService::getModelImage()
26
-            ->select(['id','file', 'brand_id'])
26
+            ->select(['id', 'file', 'brand_id'])
27 27
             ->where('brand_id', '=', $brandId);
28 28
             
29 29
             $datatables = Datatables::of($image)
30 30
 
31
-            ->addColumn('thumb', function ($image) {
31
+            ->addColumn('thumb', function($image) {
32 32
                 return '<img src="'.config('hideyo.public_path').'/brand/100x100/'.$image->brand_id.'/'.$image->file.'"  />';
33 33
             })
34
-            ->addColumn('action', function ($image) use ($brandId) {
34
+            ->addColumn('action', function($image) use ($brandId) {
35 35
                 $deleteLink = Form::deleteajax(url()->route('brand.images.destroy', array('brandId' => $brandId, 'id' => $image->id)), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
36 36
                 $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;
37 37
                 return $links;
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
             return $datatables->make(true);
41 41
         }
42 42
         
43
-        return view('backend.brand_image.index')->with(array( 'brand' => $brand));
43
+        return view('backend.brand_image.index')->with(array('brand' => $brand));
44 44
     }
45 45
 
46 46
     public function create($brandId)
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 
52 52
     public function store(Request $request, $brandId)
53 53
     {
54
-        $result  = BrandService::createImage($request->all(), $brandId);
54
+        $result = BrandService::createImage($request->all(), $brandId);
55 55
         return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was inserted.');
56 56
     }
57 57
 
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 
64 64
     public function update(Request $request, $brandId, $brandImageId)
65 65
     {
66
-        $result  = BrandService::updateImageById($request->all(), $brandId, $brandImageId);
66
+        $result = BrandService::updateImageById($request->all(), $brandId, $brandImageId);
67 67
         return BrandService::notificationRedirect(array('brand.images.index', $brandId), $result, 'The brand image was updated.');
68 68
     }
69 69
 
70 70
     public function destroy($brandId, $brandImageId)
71 71
     {
72
-        $result  = BrandService::destroyImage($brandImageId);
72
+        $result = BrandService::destroyImage($brandImageId);
73 73
 
74 74
         if ($result) {
75 75
             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
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
             $datatables = Datatables::of($clients)
36 36
 
37 37
 
38
-            ->addColumn('last_login', function ($clients) {
38
+            ->addColumn('last_login', function($clients) {
39 39
                 return date('d F H:i', strtotime($clients->last_login));
40 40
             })
41 41
 
42
-            ->addColumn('action', function ($clients) {
42
+            ->addColumn('action', function($clients) {
43 43
                 $deleteLink = Form::deleteajax(url()->route('client.destroy', $clients->id), 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
44 44
                 $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;
45 45
             
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
     public function postActivate(Request $request, $clientId)
77 77
     {
78 78
         $input = $request->all();
79
-        $result  = ClientService::activate($clientId);
79
+        $result = ClientService::activate($clientId);
80 80
 
81 81
         if ($input['send_mail']) {
82
-                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
82
+                Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
83 83
                     $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
84 84
                 });
85 85
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
     public function store(Request $request)
101 101
     {
102
-        $result  = ClientService::create($request->all());
102
+        $result = ClientService::create($request->all());
103 103
         return ClientService::notificationRedirect('client.index', $result, 'The client was inserted.');
104 104
     }
105 105
 
@@ -130,24 +130,24 @@  discard block
 block discarded – undo
130 130
 
131 131
     public function postExport()
132 132
     {
133
-        $result  =  ClientService::selectAllExport();
134
-        Excel::create('export', function ($excel) use ($result) {
133
+        $result = ClientService::selectAllExport();
134
+        Excel::create('export', function($excel) use ($result) {
135 135
 
136
-            $excel->sheet('Clients', function ($sheet) use ($result) {
136
+            $excel->sheet('Clients', function($sheet) use ($result) {
137 137
                 $newArray = array();
138 138
                 foreach ($result as $row) {
139 139
                     $firstname = null;
140
-                    if($row->clientBillAddress) {
140
+                    if ($row->clientBillAddress) {
141 141
                         $firstname = $row->clientBillAddress->firstname;
142 142
                     }
143 143
 
144 144
                     $lastname = null;
145
-                    if($row->clientBillAddress) {
145
+                    if ($row->clientBillAddress) {
146 146
                         $lastname = $row->clientBillAddress->lastname;
147 147
                     }
148 148
 
149 149
                     $gender = null;
150
-                    if($row->clientBillAddress) {
150
+                    if ($row->clientBillAddress) {
151 151
                         $gender = $row->clientBillAddress->gender;
152 152
                     }
153 153
 
@@ -171,12 +171,12 @@  discard block
 block discarded – undo
171 171
 
172 172
     public function update(Request $request, $clientId)
173 173
     {
174
-        $result  = ClientService::updateById($request->all(), $clientId);
174
+        $result = ClientService::updateById($request->all(), $clientId);
175 175
         $input = $request->all();
176 176
         if (isset($result->id)) {
177 177
             if ($result->active) {
178 178
                 if ($input['send_mail']) {
179
-                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function ($message) use ($result) {
179
+                    Mail::send('frontend.email.activate-mail', array('user' => $result->toArray(), 'billAddress' => $result->clientBillAddress->toArray()), function($message) use ($result) {
180 180
                         $message->to($result['email'])->from('[email protected]', 'Hideyo')->subject('Toegang tot account.');
181 181
                     });
182 182
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
     public function destroy($clientId)
199 199
     {
200
-        $result  = ClientService::destroy($clientId);
200
+        $result = ClientService::destroy($clientId);
201 201
 
202 202
         if ($result) {
203 203
             Notification::success('The client was 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/ErrorController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,11 +22,11 @@
 block discarded – undo
22 22
             $query = $this->error->getModel()->select(
23 23
                 [
24 24
                 'id',
25
-                'class', 'file' , 'status_code', 'line', 'message', 'url', 'method']
25
+                'class', 'file', 'status_code', 'line', 'message', 'url', 'method']
26 26
             );
27 27
             
28
-            $datatables = \Datatables::of($query)->addColumn('action', function ($query) {
29
-                $deleteLink = \Form::deleteajax('/admin/general-setting/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
28
+            $datatables = \Datatables::of($query)->addColumn('action', function($query) {
29
+                $deleteLink = \Form::deleteajax('/admin/general-setting/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
30 30
                 $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;
31 31
             
32 32
                 return $links;
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/OrderController.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 use Hideyo\Ecommerce\Framework\Services\Order\OrderFacade as OrderService;
15 15
 use Hideyo\Ecommerce\Framework\Services\Order\OrderStatusFacade as OrderStatusService;
16 16
 use Hideyo\Ecommerce\Framework\Services\PaymentMethod\PaymentMethodFacade as PaymentMethodService;
17
-use Hideyo\Ecommerce\Framework\Services\SendingMethod\SendingMethodFacade as SendingMethodService;use Hideyo\Ecommerce\Framework\Services\Product\ProductFacade as ProductService;
17
+use Hideyo\Ecommerce\Framework\Services\SendingMethod\SendingMethodFacade as SendingMethodService; use Hideyo\Ecommerce\Framework\Services\Product\ProductFacade as ProductService;
18 18
 
19 19
 use Carbon\Carbon;
20 20
 use Request;
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 {
29 29
     public function index()
30 30
     {
31
-        $shop  = auth('hideyobackend')->user()->shop;
31
+        $shop = auth('hideyobackend')->user()->shop;
32 32
         $now = Carbon::now();
33 33
 
34 34
         $revenueThisMonth = null;
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
             
59 59
             $datatables = \Datatables::of($order)
60 60
 
61
-            ->addColumn('generated_custom_order_id', function ($order) {
61
+            ->addColumn('generated_custom_order_id', function($order) {
62 62
                 return $order->generated_custom_order_id;
63 63
             })
64 64
 
65
-            ->addColumn('created_at', function ($order) {
65
+            ->addColumn('created_at', function($order) {
66 66
                 return date('d F H:i', strtotime($order->created_at));
67 67
             })
68 68
 
69
-            ->addColumn('status', function ($order) {
69
+            ->addColumn('status', function($order) {
70 70
                 if ($order->orderStatus) {
71 71
                     if ($order->orderStatus->color) {
72 72
                         return '<a href="/admin/order/'.$order->id.'" style="text-decoration:none;"><span style="background-color:'.$order->orderStatus->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$order->orderStatus->title.'</span></a>';
@@ -75,46 +75,46 @@  discard block
 block discarded – undo
75 75
                 }
76 76
             })
77 77
 
78
-            ->filterColumn('client', function ($query, $keyword) {
78
+            ->filterColumn('client', function($query, $keyword) {
79 79
 
80 80
                 $query->where(
81
-                    function ($query) use ($keyword) {
81
+                    function($query) use ($keyword) {
82 82
                         $query->whereRaw("order_address.firstname like ?", ["%{$keyword}%"]);
83 83
                         $query->orWhereRaw("order_address.lastname like ?", ["%{$keyword}%"]);
84 84
                         ;
85 85
                     }
86 86
                 );
87 87
             })
88
-            ->addColumn('client', function ($order) {
88
+            ->addColumn('client', function($order) {
89 89
                 if ($order->client) {
90 90
                     if ($order->orderBillAddress) {
91
-                        return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count() .')</a>';
91
+                        return '<a href="/admin/client/'.$order->client_id.'/order">'.$order->orderBillAddress->firstname.' '.$order->orderBillAddress->lastname.' ('.$order->client->orders->count().')</a>';
92 92
                     }
93 93
                 }
94 94
             })
95
-            ->addColumn('products', function ($order) {
95
+            ->addColumn('products', function($order) {
96 96
                 if ($order->products) {
97 97
                     return $order->products->count();
98 98
                 }
99 99
             })
100
-            ->addColumn('price_with_tax', function ($order) {
100
+            ->addColumn('price_with_tax', function($order) {
101 101
                 $money = '&euro; '.$order->getPriceWithTaxNumberFormat();
102 102
                 return $money;
103 103
             })
104 104
 
105 105
 
106
-            ->addColumn('paymentMethod', function ($order) {
106
+            ->addColumn('paymentMethod', function($order) {
107 107
                 if ($order->orderPaymentMethod) {
108 108
                     return $order->orderPaymentMethod->title;
109 109
                 }
110 110
             })
111
-            ->addColumn('sendingMethod', function ($order) {
111
+            ->addColumn('sendingMethod', function($order) {
112 112
                 if ($order->orderSendingMethod) {
113 113
                     return $order->orderSendingMethod->title;
114 114
                 }
115 115
             })
116
-            ->addColumn('action', function ($order) {
117
-                $deleteLink = \Form::deleteajax('/admin/order/'. $order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
116
+            ->addColumn('action', function($order) {
117
+                $deleteLink = \Form::deleteajax('/admin/order/'.$order->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
118 118
                 $download = '<a href="/admin/order/'.$order->id.'/download" class="btn btn-default btn-sm btn-info"><i class="entypo-pencil"></i>Download</a>  ';
119 119
             
120 120
        
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
         if ($data and $data['order']) {
149 149
 
150
-            if($data['type'] == 'one-pdf') {
150
+            if ($data['type'] == 'one-pdf') {
151 151
                 $pdfHtml = "";
152 152
                 $countOrders = count($data['order']);
153 153
                 $i = 0;
@@ -173,15 +173,15 @@  discard block
 block discarded – undo
173 173
                 $pdf = PDF::loadHTML($pdfHtmlBody);
174 174
 
175 175
                 return $pdf->download('order-'.$order->generated_custom_order_id.'.pdf');
176
-            } elseif($data['type'] == 'product-list') {
176
+            } elseif ($data['type'] == 'product-list') {
177 177
                 $products = OrderService::productsByOrderIds($data['order']);
178 178
 
179
-                if($products) {
179
+                if ($products) {
180 180
 
181 181
 
182
-                    Excel::create('products', function ($excel) use ($products) {
182
+                    Excel::create('products', function($excel) use ($products) {
183 183
 
184
-                        $excel->sheet('Products', function ($sheet) use ($products) {
184
+                        $excel->sheet('Products', function($sheet) use ($products) {
185 185
                             $newArray = array();
186 186
                             foreach ($products as $key => $row) {
187 187
                 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
         if ($orders) {
214 214
             Request::session()->put('print_orders', $orders->toArray());
215
-            return response()->json(array('orders' => $orders->toArray() ));
215
+            return response()->json(array('orders' => $orders->toArray()));
216 216
         }
217 217
 
218 218
         Request::session()->destroy('print_orders');
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     public function downloadLabel($orderId)
256 256
     {
257 257
         $order = OrderService::find($orderId);
258
-        if($order->orderLabel()->count()) {
258
+        if ($order->orderLabel()->count()) {
259 259
           header("Content-type: application/octet-stream");
260 260
           header("Content-disposition: attachment;filename=label.pdf");
261 261
           echo $order->orderLabel->data;
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
         );
289 289
         foreach ($replace as $key => $val) {
290
-            $content = str_replace("[" . $key . "]", $val, $content);
290
+            $content = str_replace("[".$key."]", $val, $content);
291 291
         }
292 292
 
293 293
         return $content;
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 
301 301
     public function update($orderId)
302 302
     {
303
-        $result  = OrderService::updateById(Request::all(), $orderId);
303
+        $result = OrderService::updateById(Request::all(), $orderId);
304 304
 
305 305
         if ($result->errors()->all()) {
306 306
             return redirect()->back()->withInput()->withErrors($result->errors()->all());
Please login to merge, or discard this patch.
app/Http/Controllers/Backend/OrderStatusController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@  discard block
 block discarded – undo
22 22
         if ($request->wantsJson()) {
23 23
 
24 24
             $query = OrderStatusService::getModel()->select(
25
-                ['id', 'color','title']
25
+                ['id', 'color', 'title']
26 26
             )->where('shop_id', '=', auth('hideyobackend')->user()->selected_shop_id);
27 27
             
28 28
             $datatables = \Datatables::of($query)
29 29
 
30
-            ->addColumn('title', function ($query) {
30
+            ->addColumn('title', function($query) {
31 31
      
32 32
                 if ($query->color) {
33 33
                     return '<span style="background-color:'.$query->color.'; padding: 10px; line-height:30px; text-align:center; color:white;">'.$query->title.'</span>';
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
             })
37 37
 
38 38
 
39
-            ->addColumn('action', function ($query) {
40
-                $deleteLink = Form::deleteajax('/admin/order-status/'. $query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
39
+            ->addColumn('action', function($query) {
40
+                $deleteLink = Form::deleteajax('/admin/order-status/'.$query->id, 'Delete', '', array('class'=>'btn btn-default btn-sm btn-danger'));
41 41
                 $links = '<a href="/admin/order-status/'.$query->id.'/edit" class="btn btn-default btn-sm btn-success"><i class="entypo-pencil"></i>Edit</a>  '.$deleteLink;
42 42
             
43 43
                 return $links;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function store(Request $request)
60 60
     {
61
-        $result  = OrderStatusService::create($request->all());
61
+        $result = OrderStatusService::create($request->all());
62 62
         return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was inserted.');
63 63
     }
64 64
 
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
 
80 80
     public function update(Request $request, $orderStatusId)
81 81
     {
82
-        $result  = OrderStatusService::updateById($request->all(), $orderStatusId);
82
+        $result = OrderStatusService::updateById($request->all(), $orderStatusId);
83 83
         return OrderStatusService::notificationRedirect('order-status.index', $result, 'The order status was updated.');
84 84
     }
85 85
 
86 86
     public function destroy($orderStatusId)
87 87
     {
88
-        $result  = OrderStatusService::destroy($orderStatusId);
88
+        $result = OrderStatusService::destroy($orderStatusId);
89 89
 
90 90
         if ($result) {
91 91
             Notification::success('The order status was deleted.');
Please login to merge, or discard this patch.