Completed
Push — development ( 544cb6...7cd4fd )
by Ashutosh
10:00
created
app/Http/Controllers/License/LicenseController.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -183,13 +183,13 @@  discard block
 block discarded – undo
183 183
         if ($details->api_error_detected == 0 && is_array($details->page_message)) {
184 184
             foreach ($details->page_message as $detail) {
185 185
                 if($detail->product_id == $productId) {
186
-                     $licenseId = $detail->license_id;
186
+                        $licenseId = $detail->license_id;
187 187
                     $productId = $detail->product_id;
188 188
                     $userId = $detail->client_id;
189 189
                 }
190 190
             }
191 191
         }
192
-          return ['productId'=>$productId, 'userId'=>$userId, 'licenseId'=>$licenseId];
192
+            return ['productId'=>$productId, 'userId'=>$userId, 'licenseId'=>$licenseId];
193 193
     }
194 194
 
195 195
 
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
         $searchInstallationId = $this->searchInstallationId($email);
205 205
         $details = json_decode($searchInstallationId);
206 206
         if ($details->api_error_detected == 0 && is_array($details->page_message)) {
207
-              foreach ($details->page_message as $detail) {
207
+                foreach ($details->page_message as $detail) {
208 208
                 if($detail->product_id == $productId) {
209
-                     $installation_id = $detail->installation_id;
209
+                        $installation_id = $detail->installation_id;
210 210
                     $installation_ip = $detail->installation_ip;
211 211
                 }
212 212
             }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
     /*
152 152
     *  Edit Existing License
153 153
     */
154
-    public function updateLicensedDomain($clientEmail, $domain,$productId,$expiryDate,$orderNo)
154
+    public function updateLicensedDomain($clientEmail, $domain, $productId, $expiryDate, $orderNo)
155 155
     {
156
-        if($expiryDate) {
156
+        if ($expiryDate) {
157 157
             $expiryDate = $expiryDate->toDateString();
158 158
         }
159 159
         $url = $this->url;
@@ -166,14 +166,14 @@  discard block
 block discarded – undo
166 166
             $ip = '';
167 167
         }
168 168
         $api_key_secret = $this->api_key_secret;
169
-        $searchLicense = $this->searchLicenseId($clientEmail,$productId);
169
+        $searchLicense = $this->searchLicenseId($clientEmail, $productId);
170 170
         $licenseId = $searchLicense['licenseId'];
171 171
         $productId = $searchLicense['productId'];
172 172
         $userId = $searchLicense['userId'];
173 173
         $updateLicense = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=licenses_edit&product_id=$productId&client_id=$userId&license_id=$licenseId&license_order_number=$orderNo&license_require_domain=1&license_status=1&license_expire_date=$expiryDate&license_domain=$domain&license_ip=$ip");
174 174
     }
175 175
 
176
-    public function searchLicenseId($email,$productId)
176
+    public function searchLicenseId($email, $productId)
177 177
     {
178 178
         $url = $this->url;
179 179
         $api_key_secret = $this->api_key_secret;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $details = json_decode($getLicenseId);
183 183
         if ($details->api_error_detected == 0 && is_array($details->page_message)) {
184 184
             foreach ($details->page_message as $detail) {
185
-                if($detail->product_id == $productId) {
185
+                if ($detail->product_id == $productId) {
186 186
                      $licenseId = $detail->license_id;
187 187
                     $productId = $detail->product_id;
188 188
                     $userId = $detail->client_id;
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
 
196 196
     //Update the Installation status as Inactive after Licensed Domain Is Chnaged
197
-    public function updateInstalledDomain($email,$productId)
197
+    public function updateInstalledDomain($email, $productId)
198 198
     {
199 199
         $installation_id = '';
200 200
         $installation_ip = '';
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         $details = json_decode($searchInstallationId);
206 206
         if ($details->api_error_detected == 0 && is_array($details->page_message)) {
207 207
               foreach ($details->page_message as $detail) {
208
-                if($detail->product_id == $productId) {
208
+                if ($detail->product_id == $productId) {
209 209
                      $installation_id = $detail->installation_id;
210 210
                     $installation_ip = $detail->installation_ip;
211 211
                 }
Please login to merge, or discard this patch.
app/Http/Controllers/Order/ExtendedOrderController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
         $order->save();
166 166
         $licenseStatus = StatusSetting::pluck('license_status')->first();
167 167
         if ($licenseStatus == 1) {
168
-              $expiryDate = $order->subscription->ends_at;
168
+                $expiryDate = $order->subscription->ends_at;
169 169
             $cont = new \App\Http\Controllers\License\LicenseController();
170 170
             $updateLicensedDomain = $cont->updateLicensedDomain($clientEmail, $order->domain,$order->product,$expiryDate,$order->number);
171 171
             //Now make Installation status as inactive
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,9 +167,9 @@
 block discarded – undo
167 167
         if ($licenseStatus == 1) {
168 168
               $expiryDate = $order->subscription->ends_at;
169 169
             $cont = new \App\Http\Controllers\License\LicenseController();
170
-            $updateLicensedDomain = $cont->updateLicensedDomain($clientEmail, $order->domain,$order->product,$expiryDate,$order->number);
170
+            $updateLicensedDomain = $cont->updateLicensedDomain($clientEmail, $order->domain, $order->product, $expiryDate, $order->number);
171 171
             //Now make Installation status as inactive
172
-            $updateInstallStatus = $cont->updateInstalledDomain($clientEmail,$order->product);
172
+            $updateInstallStatus = $cont->updateInstalledDomain($clientEmail, $order->product);
173 173
         }
174 174
 
175 175
         return ['message' => 'success', 'update'=>'Licensed Domain Updated'];
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
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         try {
131 131
             $versions = ProductUpload::where('product_id', $productid)
132 132
             ->select('id', 'product_id', 'version',
133
-             'title', 'description', 'file', 'created_at')->get();
133
+                'title', 'description', 'file', 'created_at')->get();
134 134
             $countVersions = count($versions);
135 135
             $countExpiry = 0;
136 136
             $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first();
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
 
139 139
             $order_id = $order->id;
140 140
             $endDate = Subscription::select('ends_at')
141
-                 ->where('product_id', $productid)->where('order_id', $order_id)->first();
141
+                    ->where('product_id', $productid)->where('order_id', $order_id)->first();
142 142
             if ($endDate) {
143 143
                 foreach ($versions as $version) {
144 144
                     if ($version->created_at->toDateTimeString()
145
-               < $endDate->ends_at->toDateTimeString()) {
145
+                < $endDate->ends_at->toDateTimeString()) {
146 146
                         $countExpiry = $countExpiry + 1;
147 147
                     }
148 148
                 }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             $bussinesses = \App\Model\Common\Bussiness::pluck('name', 'short')->toArray();
395 395
 
396 396
             return view('themes.default1.front.clients.profile',
397
-             compact('user', 'timezones', 'state', 'states', 'bussinesses'));
397
+                compact('user', 'timezones', 'state', 'states', 'bussinesses'));
398 398
         } catch (Exception $ex) {
399 399
             Bugsnag::notifyException($ex);
400 400
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
             }
433 433
             $product = $order->product()->first();
434 434
             $price = $product->price()->first();
435
-             $licenseStatus = StatusSetting::pluck('license_status')->first();
435
+                $licenseStatus = StatusSetting::pluck('license_status')->first();
436 436
             $user = \Auth::user();
437 437
 
438 438
             return view('themes.default1.front.clients.show-order',
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
                                 return $model->grand_total;
475 475
                             })
476 476
                             ->rawColumns(['checkbox', 'number', 'total',
477
-                             'payment_method', 'payment_status', 'created_at', ])
477
+                                'payment_method', 'payment_status', 'created_at', ])
478 478
                             ->make(true);
479 479
         } catch (Exception $ex) {
480 480
             Bugsnag::notifyException($ex);
@@ -500,17 +500,17 @@  discard block
 block discarded – undo
500 500
                             ->addColumn('number', function ($model) {
501 501
                                 return $model->invoice()->first()->number;
502 502
                             })
503
-                              ->addColumn('total', function ($model) {
504
-                                  return $model->amount;
505
-                              })
506
-                               ->addColumn('created_at', function ($model) {
507
-                                   $date1 = new DateTime($model->created_at);
508
-                                   $tz = \Auth::user()->timezone()->first()->name;
509
-                                   $date1->setTimezone(new DateTimeZone($tz));
510
-                                   $date = $date1->format('M j, Y, g:i a');
511
-
512
-                                   return $date;
513
-                               })
503
+                                ->addColumn('total', function ($model) {
504
+                                    return $model->amount;
505
+                                })
506
+                                ->addColumn('created_at', function ($model) {
507
+                                    $date1 = new DateTime($model->created_at);
508
+                                    $tz = \Auth::user()->timezone()->first()->name;
509
+                                    $date1->setTimezone(new DateTimeZone($tz));
510
+                                    $date = $date1->format('M j, Y, g:i a');
511
+
512
+                                    return $date;
513
+                                })
514 514
 
515 515
                             ->addColumn('payment_method', 'payment_status', 'created_at')
516 516
 
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -78,20 +78,20 @@  discard block
 block discarded – undo
78 78
                     ->select('number', 'created_at', 'grand_total', 'id', 'status');
79 79
 
80 80
             return \DataTables::of($invoices->get())
81
-                            ->addColumn('number', function ($model) {
81
+                            ->addColumn('number', function($model) {
82 82
                                 return $model->number;
83 83
                             })
84
-                            ->addColumn('date', function ($model) {
84
+                            ->addColumn('date', function($model) {
85 85
                                 $date = $model->created_at;
86 86
 
87 87
                                 return $date;
88 88
                                 // $myobject->created_at->timezone($this->auth->user()->timezone);
89 89
                             })
90 90
                             // ->showColumns('created_at')
91
-                            ->addColumn('total', function ($model) {
91
+                            ->addColumn('total', function($model) {
92 92
                                 return $model->grand_total;
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) {
@@ -149,19 +149,19 @@  discard block
 block discarded – undo
149 149
             }
150 150
 
151 151
             return \DataTables::of($versions)
152
-                            ->addColumn('id', function ($versions) {
152
+                            ->addColumn('id', function($versions) {
153 153
                                 return ucfirst($versions->id);
154 154
                             })
155
-                            ->addColumn('version', function ($versions) {
155
+                            ->addColumn('version', function($versions) {
156 156
                                 return ucfirst($versions->version);
157 157
                             })
158
-                            ->addColumn('title', function ($versions) {
158
+                            ->addColumn('title', function($versions) {
159 159
                                 return ucfirst($versions->title);
160 160
                             })
161
-                            ->addColumn('description', function ($versions) {
161
+                            ->addColumn('description', function($versions) {
162 162
                                 return ucfirst($versions->description);
163 163
                             })
164
-                            ->addColumn('file', function ($versions) use ($countExpiry, $countVersions,$clientid, $invoiceid, $productid) {
164
+                            ->addColumn('file', function($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
165 165
                                 $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first();
166 166
                                 $order = Order::where('invoice_id', '=', $invoice_id)->first();
167 167
                                 $order_id = $order->id;
@@ -262,18 +262,18 @@  discard block
 block discarded – undo
262 262
             }
263 263
 
264 264
             return \DataTables::of($link)
265
-                            ->addColumn('version', function ($link) {
265
+                            ->addColumn('version', function($link) {
266 266
                                 return ucfirst($link['tag_name']);
267 267
                             })
268
-                            ->addColumn('name', function ($link) {
268
+                            ->addColumn('name', function($link) {
269 269
                                 return ucfirst($link['name']);
270 270
                             })
271
-                            ->addColumn('description', function ($link) {
271
+                            ->addColumn('description', function($link) {
272 272
                                 $markdown = Markdown::convertToHtml(ucfirst($link['body']));
273 273
 
274 274
                                 return $markdown;
275 275
                             })
276
-                            ->addColumn('file', function ($link) use ($countExpiry,$countVersions,$invoiceid, $productid) {
276
+                            ->addColumn('file', function($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
277 277
                                 $order = Order::where('invoice_id', '=', $invoiceid)->first();
278 278
                                 $order_id = $order->id;
279 279
                                 $orderEndDate = Subscription::select('ends_at')
@@ -320,20 +320,20 @@  discard block
 block discarded – undo
320 320
             $orders = Order::where('client', \Auth::user()->id);
321 321
 
322 322
             return \DataTables::of($orders->get())
323
-                            ->addColumn('id', function ($model) {
323
+                            ->addColumn('id', function($model) {
324 324
                                 return $model->id;
325 325
                             })
326
-                            ->addColumn('product_name', function ($model) {
326
+                            ->addColumn('product_name', function($model) {
327 327
                                 return $model->product()->first()->name;
328 328
                             })
329
-                            ->addColumn('expiry', function ($model) {
329
+                            ->addColumn('expiry', function($model) {
330 330
                                 $tz = \Auth::user()->timezone()->first()->name;
331 331
                                 $end = $this->getExpiryDate($model);
332 332
 
333 333
                                 return $end;
334 334
                             })
335 335
 
336
-                            ->addColumn('Action', function ($model) {
336
+                            ->addColumn('Action', function($model) {
337 337
                                 $sub = $model->subscription()->first();
338 338
                                 $order = Order::where('id', $model->id)->select('product')->first();
339 339
                                 $productid = $order->product;
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
             $user = \Auth::user();
437 437
 
438 438
             return view('themes.default1.front.clients.show-order',
439
-                compact('invoice', 'order', 'user', 'plan', 'product', 'subscription','licenseStatus'));
439
+                compact('invoice', 'order', 'user', 'plan', 'product', 'subscription', 'licenseStatus'));
440 440
         } catch (Exception $ex) {
441 441
             Bugsnag::notifyException($ex);
442 442
 
@@ -460,17 +460,17 @@  discard block
 block discarded – undo
460 460
                     ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at');
461 461
 
462 462
             return \DataTables::of($payments->get())
463
-                            ->addColumn('checkbox', function ($model) {
463
+                            ->addColumn('checkbox', function($model) {
464 464
                                 if (\Input::get('client') != 'true') {
465 465
                                     return "<input type='checkbox' class='payment_checkbox' 
466 466
                                     value=".$model->id.' name=select[] id=check>';
467 467
                                 }
468 468
                             })
469
-                            ->addColumn('number', function ($model) {
469
+                            ->addColumn('number', function($model) {
470 470
                                 return $model->invoice()->first()->number;
471 471
                             })
472 472
                             ->addColumn('amount', 'payment_method', 'payment_status', 'created_at')
473
-                            ->addColumn('total', function ($model) {
473
+                            ->addColumn('total', function($model) {
474 474
                                 return $model->grand_total;
475 475
                             })
476 476
                             ->rawColumns(['checkbox', 'number', 'total',
@@ -497,13 +497,13 @@  discard block
 block discarded – undo
497 497
                     ->select('id', 'invoice_id', 'user_id', 'payment_method', 'payment_status', 'created_at', 'amount');
498 498
             //dd(\Input::all());
499 499
             return \DataTables::of($payments->get())
500
-                            ->addColumn('number', function ($model) {
500
+                            ->addColumn('number', function($model) {
501 501
                                 return $model->invoice()->first()->number;
502 502
                             })
503
-                              ->addColumn('total', function ($model) {
503
+                              ->addColumn('total', function($model) {
504 504
                                   return $model->amount;
505 505
                               })
506
-                               ->addColumn('created_at', function ($model) {
506
+                               ->addColumn('created_at', function($model) {
507 507
                                    $date1 = new DateTime($model->created_at);
508 508
                                    $tz = \Auth::user()->timezone()->first()->name;
509 509
                                    $date1->setTimezone(new DateTimeZone($tz));
Please login to merge, or discard this patch.