Completed
Push — development ( 3f3e53...8b03af )
by Ashutosh
11:48
created
app/Http/Controllers/License/LicenseController.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         }
176 176
         $url = $this->url;
177 177
         $isIP = (bool) ip2long($domain);
178
-         if ($isIP == true) {
178
+            if ($isIP == true) {
179 179
             $requiredomain = 0;
180 180
             $ip = $domain;
181 181
             $domain = '';
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             }
261 261
         }
262 262
         return ['installed_path' => $installation_domain , 'installed_ip' => $installation_ip];
263
-     }
263
+        }
264 264
 
265 265
     //Update  Expiration Date After Renewal
266 266
     public function updateExpirationDate($licenseCode, $expiryDate, $productId, $domain, $orderNo, $licenseExpiry, $supportExpiry)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@
 block discarded – undo
259 259
                 }
260 260
             }
261 261
         }
262
-        return ['installed_path' => $installation_domain , 'installed_ip' => $installation_ip];
262
+        return ['installed_path' => $installation_domain, 'installed_ip' => $installation_ip];
263 263
      }
264 264
 
265 265
     //Update  Expiration Date After Renewal
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -83,7 +83,8 @@  discard block
 block discarded – undo
83 83
             $getProductId = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=search
84 84
             &search_type=product&search_keyword=$product_sku");
85 85
             $details = json_decode($getProductId);
86
-            if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if Product_sku is updated
86
+            if ($details->api_error_detected == 0 && is_array($details->page_message)) {
87
+//This is not true if Product_sku is updated
87 88
                 $productId = $details->page_message[0]->product_id;
88 89
             }
89 90
 
@@ -130,7 +131,8 @@  discard block
 block discarded – undo
130 131
       &search_type=client&search_keyword=$email");
131 132
 
132 133
         $details = json_decode($getUserId);
133
-        if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if email is updated
134
+        if ($details->api_error_detected == 0 && is_array($details->page_message)) {
135
+//This is not true if email is updated
134 136
             $userId = $details->page_message[0]->client_id;
135 137
         }
136 138
 
@@ -246,7 +248,7 @@  discard block
 block discarded – undo
246 248
         return $getInstallId;
247 249
     }
248 250
 
249
-    public function searchInstallationPath($licenseCode, $productId) 
251
+    public function searchInstallationPath($licenseCode, $productId)
250 252
     {
251 253
         $installation_domain = array();
252 254
         $installation_ip = array();
Please login to merge, or discard this patch.
app/Http/Controllers/Front/ClientController.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
             $order_id = $order->id;
147 147
             $updatesEndDate = Subscription::select('update_ends_at')
148
-                 ->where('product_id', $productid)->where('order_id', $order_id)->first();
148
+                    ->where('product_id', $productid)->where('order_id', $order_id)->first();
149 149
             if ($updatesEndDate) {
150 150
                 foreach ($versions as $version) {
151 151
                     if ($version->created_at->toDateTimeString()
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
                 $plan = $subscription->plan()->first();
370 370
             }
371 371
             $licenseStatus = StatusSetting::pluck('license_status')->first();
372
-             if ($licenseStatus == 1) {
372
+                if ($licenseStatus == 1) {
373 373
                 $cont = new \App\Http\Controllers\License\LicenseController();
374 374
                 $installationDetails = $cont->searchInstallationPath($order->serial_key,$order->product);
375 375
             }
@@ -423,9 +423,9 @@  discard block
 block discarded – undo
423 423
                             ->addColumn('payment_method', function ($model) {
424 424
                                 return $model->payment_method;
425 425
                             })
426
-                             ->addColumn('payment_status', function ($model) {
427
-                                 return $model->payment_status;
428
-                             })
426
+                                ->addColumn('payment_status', function ($model) {
427
+                                    return $model->payment_status;
428
+                                })
429 429
                             ->addColumn('created_at', function ($model) {
430 430
                                 $date1 = new DateTime($model->created_at);
431 431
                                 $tz = \Auth::user()->timezone()->first()->name;
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
                                 return $date;
436 436
                             })
437 437
                             ->rawColumns(['checkbox', 'number', 'amount',
438
-                             'payment_method', 'payment_status', 'created_at', ])
438
+                                'payment_method', 'payment_status', 'created_at', ])
439 439
                             ->make(true);
440 440
         } catch (Exception $ex) {
441 441
             Bugsnag::notifyException($ex);
@@ -461,17 +461,17 @@  discard block
 block discarded – undo
461 461
                             ->addColumn('number', function ($model) {
462 462
                                 return $model->invoice()->first()->number;
463 463
                             })
464
-                              ->addColumn('total', function ($model) {
465
-                                  return $model->amount;
466
-                              })
467
-                               ->addColumn('created_at', function ($model) {
468
-                                   $date1 = new DateTime($model->created_at);
469
-                                   $tz = \Auth::user()->timezone()->first()->name;
470
-                                   $date1->setTimezone(new DateTimeZone($tz));
471
-                                   $date = $date1->format('M j, Y, g:i a');
472
-
473
-                                   return $date;
474
-                               })
464
+                                ->addColumn('total', function ($model) {
465
+                                    return $model->amount;
466
+                                })
467
+                                ->addColumn('created_at', function ($model) {
468
+                                    $date1 = new DateTime($model->created_at);
469
+                                    $tz = \Auth::user()->timezone()->first()->name;
470
+                                    $date1->setTimezone(new DateTimeZone($tz));
471
+                                    $date = $date1->format('M j, Y, g:i a');
472
+
473
+                                    return $date;
474
+                                })
475 475
 
476 476
                             ->addColumn('payment_method', 'payment_status', 'created_at')
477 477
 
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -80,18 +80,18 @@  discard block
 block discarded – undo
80 80
                     ->select('number', 'created_at', 'grand_total', 'id', 'status');
81 81
 
82 82
             return \DataTables::of($invoices->get())
83
-                            ->addColumn('number', function ($model) {
83
+                            ->addColumn('number', function($model) {
84 84
                                 return $model->number;
85 85
                             })
86
-                            ->addColumn('date', function ($model) {
86
+                            ->addColumn('date', function($model) {
87 87
                                 $date = $model->created_at;
88 88
 
89 89
                                 return $date;
90 90
                             })
91
-                            ->addColumn('total', function ($model) {
91
+                            ->addColumn('total', function($model) {
92 92
                                 return  currency_format($model->grand_total, $code = \Auth::user()->currency);
93 93
                             })
94
-                            ->addColumn('Action', function ($model) {
94
+                            ->addColumn('Action', function($model) {
95 95
                                 $status = $model->status;
96 96
                                 $payment = '';
97 97
                                 if ($status == 'Pending' && $model->grand_total > 0) {
@@ -156,19 +156,19 @@  discard block
 block discarded – undo
156 156
             }
157 157
 
158 158
             return \DataTables::of($versions)
159
-                            ->addColumn('id', function ($versions) {
159
+                            ->addColumn('id', function($versions) {
160 160
                                 return ucfirst($versions->id);
161 161
                             })
162
-                            ->addColumn('version', function ($versions) {
162
+                            ->addColumn('version', function($versions) {
163 163
                                 return ucfirst($versions->version);
164 164
                             })
165
-                            ->addColumn('title', function ($versions) {
165
+                            ->addColumn('title', function($versions) {
166 166
                                 return ucfirst($versions->title);
167 167
                             })
168
-                            ->addColumn('description', function ($versions) {
168
+                            ->addColumn('description', function($versions) {
169 169
                                 return ucfirst($versions->description);
170 170
                             })
171
-                            ->addColumn('file', function ($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
171
+                            ->addColumn('file', function($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
172 172
                                 $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first();
173 173
                                 $order = Order::where('invoice_id', '=', $invoice_id)->first();
174 174
                                 $order_id = $order->id;
@@ -234,18 +234,18 @@  discard block
 block discarded – undo
234 234
             }
235 235
 
236 236
             return \DataTables::of($link)
237
-                            ->addColumn('version', function ($link) {
237
+                            ->addColumn('version', function($link) {
238 238
                                 return ucfirst($link['tag_name']);
239 239
                             })
240
-                            ->addColumn('name', function ($link) {
240
+                            ->addColumn('name', function($link) {
241 241
                                 return ucfirst($link['name']);
242 242
                             })
243
-                            ->addColumn('description', function ($link) {
243
+                            ->addColumn('description', function($link) {
244 244
                                 $markdown = Markdown::convertToHtml(ucfirst($link['body']));
245 245
 
246 246
                                 return $markdown;
247 247
                             })
248
-                            ->addColumn('file', function ($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
248
+                            ->addColumn('file', function($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
249 249
                                 $order = Order::where('invoice_id', '=', $invoiceid)->first();
250 250
                                 $order_id = $order->id;
251 251
                                 $orderEndDate = Subscription::select('update_ends_at')
@@ -281,20 +281,20 @@  discard block
 block discarded – undo
281 281
             $orders = Order::where('client', \Auth::user()->id);
282 282
 
283 283
             return \DataTables::of($orders->get())
284
-                            ->addColumn('id', function ($model) {
284
+                            ->addColumn('id', function($model) {
285 285
                                 return $model->id;
286 286
                             })
287
-                            ->addColumn('product_name', function ($model) {
287
+                            ->addColumn('product_name', function($model) {
288 288
                                 return $model->product()->first()->name;
289 289
                             })
290
-                            ->addColumn('expiry', function ($model) {
290
+                            ->addColumn('expiry', function($model) {
291 291
                                 $tz = \Auth::user()->timezone()->first()->name;
292 292
                                 $end = $this->getExpiryDate($model);
293 293
 
294 294
                                 return $end;
295 295
                             })
296 296
 
297
-                            ->addColumn('Action', function ($model) {
297
+                            ->addColumn('Action', function($model) {
298 298
                                 $sub = $model->subscription()->first();
299 299
                                 $order = Order::where('id', $model->id)->select('product')->first();
300 300
                                 $productid = $order->product;
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
             $licenseStatus = StatusSetting::pluck('license_status')->first();
372 372
              if ($licenseStatus == 1) {
373 373
                 $cont = new \App\Http\Controllers\License\LicenseController();
374
-                $installationDetails = $cont->searchInstallationPath($order->serial_key,$order->product);
374
+                $installationDetails = $cont->searchInstallationPath($order->serial_key, $order->product);
375 375
             }
376 376
             $product = $order->product()->first();
377 377
             $price = $product->price()->first();
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 
381 381
             return view(
382 382
                 'themes.default1.front.clients.show-order',
383
-                compact('invoice', 'order', 'user', 'plan', 'product', 'subscription', 'licenseStatus','installationDetails')
383
+                compact('invoice', 'order', 'user', 'plan', 'product', 'subscription', 'licenseStatus', 'installationDetails')
384 384
             );
385 385
         } catch (Exception $ex) {
386 386
             Bugsnag::notifyException($ex);
@@ -405,28 +405,28 @@  discard block
 block discarded – undo
405 405
                     ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at');
406 406
 
407 407
             return \DataTables::of($payments->get())
408
-                            ->addColumn('checkbox', function ($model) {
408
+                            ->addColumn('checkbox', function($model) {
409 409
                                 if (\Input::get('client') != 'true') {
410 410
                                     return "<input type='checkbox' class='payment_checkbox' 
411 411
                                     value=".$model->id.' name=select[] id=check>';
412 412
                                 }
413 413
                             })
414
-                            ->addColumn('number', function ($model) {
414
+                            ->addColumn('number', function($model) {
415 415
                                 return $model->invoice()->first()->number;
416 416
                             })
417
-                            ->addColumn('amount', function ($model) {
417
+                            ->addColumn('amount', function($model) {
418 418
                                 $currency = $model->invoice()->first()->currency;
419 419
                                 $total = currency_format($model->amount, $code = $currency);
420 420
 
421 421
                                 return $total;
422 422
                             })
423
-                            ->addColumn('payment_method', function ($model) {
423
+                            ->addColumn('payment_method', function($model) {
424 424
                                 return $model->payment_method;
425 425
                             })
426
-                             ->addColumn('payment_status', function ($model) {
426
+                             ->addColumn('payment_status', function($model) {
427 427
                                  return $model->payment_status;
428 428
                              })
429
-                            ->addColumn('created_at', function ($model) {
429
+                            ->addColumn('created_at', function($model) {
430 430
                                 $date1 = new DateTime($model->created_at);
431 431
                                 $tz = \Auth::user()->timezone()->first()->name;
432 432
                                 $date1->setTimezone(new DateTimeZone($tz));
@@ -458,13 +458,13 @@  discard block
 block discarded – undo
458 458
                     ->select('id', 'invoice_id', 'user_id', 'payment_method', 'payment_status', 'created_at', 'amount');
459 459
             //dd(\Input::all());
460 460
             return \DataTables::of($payments->get())
461
-                            ->addColumn('number', function ($model) {
461
+                            ->addColumn('number', function($model) {
462 462
                                 return $model->invoice()->first()->number;
463 463
                             })
464
-                              ->addColumn('total', function ($model) {
464
+                              ->addColumn('total', function($model) {
465 465
                                   return $model->amount;
466 466
                               })
467
-                               ->addColumn('created_at', function ($model) {
467
+                               ->addColumn('created_at', function($model) {
468 468
                                    $date1 = new DateTime($model->created_at);
469 469
                                    $tz = \Auth::user()->timezone()->first()->name;
470 470
                                    $date1->setTimezone(new DateTimeZone($tz));
Please login to merge, or discard this patch.
app/Http/Controllers/Order/OrderController.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -105,16 +105,16 @@  discard block
 block discarded – undo
105 105
 
106 106
         return \DataTables::of($query->take(50))
107 107
                         ->setTotalRecords($query->count())
108
-                        ->addColumn('checkbox', function ($model) {
108
+                        ->addColumn('checkbox', function($model) {
109 109
                             return "<input type='checkbox' class='order_checkbox' value=".
110 110
                             $model->id.' name=select[] id=check>';
111 111
                         })
112
-                        ->addColumn('date', function ($model) {
112
+                        ->addColumn('date', function($model) {
113 113
                             $date = $model->created_at;
114 114
 
115 115
                             return "<span style='display:none'>$model->id</span>".$date;
116 116
                         })
117
-                        ->addColumn('client', function ($model) {
117
+                        ->addColumn('client', function($model) {
118 118
                             $user = $this->user->where('id', $model->client)->first();
119 119
                             $first = $user->first_name;
120 120
                             $last = $user->last_name;
@@ -122,30 +122,30 @@  discard block
 block discarded – undo
122 122
 
123 123
                             return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'<a>';
124 124
                         })
125
-                        ->addColumn('productname', function ($model) {
125
+                        ->addColumn('productname', function($model) {
126 126
                             $productid = ($model->product);
127 127
                             $productName = Product::where('id', $productid)->pluck('name')->first();
128 128
 
129 129
                             return $productName;
130 130
                         })
131
-                        ->addColumn('number', function ($model) {
131
+                        ->addColumn('number', function($model) {
132 132
                             return ucfirst($model->number);
133 133
                         })
134
-                        ->addColumn('price_override', function ($model) {
134
+                        ->addColumn('price_override', function($model) {
135 135
                             $currency = $model->user()->find($model->client)->currency;
136 136
 
137 137
                             return currency_format($model->price_override, $code = $currency);
138 138
                         })
139
-                        ->addColumn('order_status', function ($model) {
139
+                        ->addColumn('order_status', function($model) {
140 140
                             return ucfirst($model->order_status);
141 141
                         })
142 142
                         // ->showColumns('number', 'price_override', 'order_status')
143
-                        ->addColumn('update_ends_at', function ($model) {
143
+                        ->addColumn('update_ends_at', function($model) {
144 144
                             $end = $this->getEndDate($model);
145 145
 
146 146
                             return $end;
147 147
                         })
148
-                        ->addColumn('action', function ($model) {
148
+                        ->addColumn('action', function($model) {
149 149
                             $sub = $model->subscription()->first();
150 150
                             $status = $this->checkInvoiceStatusByOrderId($model->id);
151 151
                             $url = $this->getUrl($model, $status, $sub);
@@ -153,30 +153,30 @@  discard block
 block discarded – undo
153 153
                             return $url;
154 154
                         })
155 155
 
156
-                         ->filterColumn('created_at', function ($query, $keyword) {
156
+                         ->filterColumn('created_at', function($query, $keyword) {
157 157
                              $sql = 'created_at like ?';
158 158
                              $query->whereRaw($sql, ["%{$keyword}%"]);
159 159
                          })
160 160
 
161
-                          ->filterColumn('client', function ($query, $keyword) {
161
+                          ->filterColumn('client', function($query, $keyword) {
162 162
                               $sql = 'client like ?';
163 163
                               $query->whereRaw($sql, ["%{$keyword}%"]);
164 164
                           })
165 165
 
166
-                           ->filterColumn('number', function ($query, $keyword) {
166
+                           ->filterColumn('number', function($query, $keyword) {
167 167
                                $sql = 'number like ?';
168 168
                                $query->whereRaw($sql, ["%{$keyword}%"]);
169 169
                            })
170
-                            ->filterColumn('price_override', function ($query, $keyword) {
170
+                            ->filterColumn('price_override', function($query, $keyword) {
171 171
                                 $sql = 'price_override like ?';
172 172
                                 $query->whereRaw($sql, ["%{$keyword}%"]);
173 173
                             })
174
-                             ->filterColumn('order_status', function ($query, $keyword) {
174
+                             ->filterColumn('order_status', function($query, $keyword) {
175 175
                                  $sql = 'order_status like ?';
176 176
                                  $query->whereRaw($sql, ["%{$keyword}%"]);
177 177
                              })
178 178
 
179
-                              ->filterColumn('update_ends_at', function ($query, $keyword) {
179
+                              ->filterColumn('update_ends_at', function($query, $keyword) {
180 180
                                   $sql = 'update_ends_at like ?';
181 181
                                   $query->whereRaw($sql, ["%{$keyword}%"]);
182 182
                               })
@@ -227,10 +227,10 @@  discard block
 block discarded – undo
227 227
             $licenseStatus = StatusSetting::pluck('license_status')->first();
228 228
             if ($licenseStatus == 1) {
229 229
                 $cont = new \App\Http\Controllers\License\LicenseController();
230
-                $installationDetails = $cont->searchInstallationPath($order->serial_key,$order->product);
230
+                $installationDetails = $cont->searchInstallationPath($order->serial_key, $order->product);
231 231
             }
232 232
             return view('themes.default1.order.show',
233
-                compact('invoiceItems', 'invoice', 'user', 'order', 'subscription', 'licenseStatus','installationDetails'));
233
+                compact('invoiceItems', 'invoice', 'user', 'order', 'subscription', 'licenseStatus', 'installationDetails'));
234 234
         } catch (\Exception $ex) {
235 235
             Bugsnag::notifyException($ex);
236 236
 
Please login to merge, or discard this patch.