Completed
Branch feature-dynamic-fields (9e5831)
by Ashutosh
13:15
created
app/Http/Controllers/Front/BaseCartController.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -192,8 +192,8 @@  discard block
 block discarded – undo
192 192
         $currency = $request->input('currency');
193 193
         $symbol = $request->input('symbol');
194 194
         Cart::update($id, [
195
-             'price'    => $price,
196
-           'attributes' => ['agents' => $agtqty, 'currency'=>['currency'=>$currency, 'symbol'=>$symbol]],
195
+                'price'    => $price,
196
+            'attributes' => ['agents' => $agtqty, 'currency'=>['currency'=>$currency, 'symbol'=>$symbol]],
197 197
         ]);
198 198
 
199 199
         return 'success';
@@ -214,8 +214,8 @@  discard block
 block discarded – undo
214 214
         $currency = $request->input('currency');
215 215
         $symbol = $request->input('symbol');
216 216
         Cart::update($id, [
217
-           'price'      => $price,
218
-           'attributes' => ['agents' =>  $agtqty, 'currency'=>['currency'=>$currency, 'symbol'=>$symbol]],
217
+            'price'      => $price,
218
+            'attributes' => ['agents' =>  $agtqty, 'currency'=>['currency'=>$currency, 'symbol'=>$symbol]],
219 219
         ]);
220 220
 
221 221
         return 'success';
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
                 'relative' => false,
259 259
                 'value'    => $qty,
260 260
             ],
261
-           'price'  => $price,
261
+            'price'  => $price,
262 262
         ]);
263 263
 
264 264
         return 'success';
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             $actualPrice = $this->cost($product->id);
296 296
             // $taxConditions = $this->checkTax($id);
297 297
             $items = ['id'     => $id, 'name' => $product->name, 'price' => $actualPrice,
298
-                 'quantity'    => $qty, 'attributes' => ['currency' => $currency, 'agents'=> $agents], ];
298
+                    'quantity'    => $qty, 'attributes' => ['currency' => $currency, 'agents'=> $agents], ];
299 299
 
300 300
             return $items;
301 301
         } catch (\Exception $e) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -283,7 +283,8 @@
 block discarded – undo
283 283
             $planid = $this->checkPlanSession() === true ? Session::get('plan') : 0; //Get Plan id From Session
284 284
             $product = Product::find($id);
285 285
             $plan = $product->planRelation->find($planid);
286
-            if ($plan) { //If Plan For a Product exists
286
+            if ($plan) {
287
+//If Plan For a Product exists
287 288
                 $quantity = $plan->planPrice->first()->product_quantity;
288 289
                 //If Product quantity is null(when show agent in Product Seting Selected),then set quantity as 1;
289 290
                 $qty = $quantity != null ? $quantity : 1;
Please login to merge, or discard this patch.
app/Http/Controllers/Front/ExtendedBaseCartController.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,13 +134,15 @@
 block discarded – undo
134 134
                 $planid = Session::get('plan');
135 135
             }
136 136
             $plan = Plan::where('id', $planid)->where('product', $productid)->first();
137
-            if ($plan) { //Get the Total Plan Cost if the Plan Exists For a Product
137
+            if ($plan) {
138
+//Get the Total Plan Cost if the Plan Exists For a Product
138 139
                 $months = 1;
139 140
                 $currency = $this->currency($userid);
140 141
                 $product = Product::find($productid);
141 142
                 $days = $plan->periods->pluck('days')->first();
142 143
                 $price = ($product->planRelation->find($planid)->planPrice->where('currency', $currency['currency'])->first()->add_price);
143
-                if ($days) { //If Period Is defined for a Particular Plan ie no. of Days Generated
144
+                if ($days) {
145
+//If Period Is defined for a Particular Plan ie no. of Days Generated
144 146
                     $months = $days >= '365' ? $days / 30 / 12 : $days / 30;
145 147
                 }
146 148
                 $finalPrice = str_replace(',', '', $price);
Please login to merge, or discard this patch.
app/Http/Controllers/Front/PageController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
73 73
                         })
74 74
 
75
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'content', 'action'])
75
+                            ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'content', 'action'])
76 76
                         ->make(true);
77 77
         // ->searchColumns('name', 'content')
78 78
                         // ->orderColumns('name')
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -49,30 +49,30 @@  discard block
 block discarded – undo
49 49
     public function getPages()
50 50
     {
51 51
         return \DataTables::of($this->page->get())
52
-                        ->addColumn('checkbox', function ($model) {
52
+                        ->addColumn('checkbox', function($model) {
53 53
                             return "<input type='checkbox' class='page_checkbox' 
54 54
                             value=".$model->id.' name=select[] id=check>';
55 55
                         })
56
-                        ->addColumn('name', function ($model) {
56
+                        ->addColumn('name', function($model) {
57 57
                             return ucfirst($model->name);
58 58
                         })
59
-                        ->addColumn('url', function ($model) {
59
+                        ->addColumn('url', function($model) {
60 60
                             return $model->url;
61 61
                         })
62
-                        ->addColumn('created_at', function ($model) {
62
+                        ->addColumn('created_at', function($model) {
63 63
                             return $model->created_at;
64 64
                         })
65 65
 
66
-                        ->addColumn('content', function ($model) {
66
+                        ->addColumn('content', function($model) {
67 67
                             return str_limit($model->content, 10, '...');
68 68
                         })
69
-                        ->addColumn('action', function ($model) {
69
+                        ->addColumn('action', function($model) {
70 70
                             return '<a href='.url('pages/'.$model->id.'/edit')
71 71
                             ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
72 72
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
73 73
                         })
74 74
 
75
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'content', 'action'])
75
+                          ->rawColumns(['checkbox', 'name', 'url', 'created_at', 'content', 'action'])
76 76
                         ->make(true);
77 77
         // ->searchColumns('name', 'content')
78 78
                         // ->orderColumns('name')
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             $selectedParent = $this->page->where('id', $id)->pluck('parent_page_id')->toArray();
105 105
             $parentName = $this->page->where('id', $selectedParent)->pluck('name', 'id')->toArray();
106 106
 
107
-            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate','selectedParent',
107
+            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate', 'selectedParent',
108 108
                 'parentName'));
109 109
         } catch (\Exception $ex) {
110 110
             return redirect()->back()->with('fails', $ex->getMessage());
Please login to merge, or discard this patch.
app/Http/Controllers/Front/ClientController.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
             $order_id = $order->id;
146 146
             $updatesEndDate = Subscription::select('update_ends_at')
147
-                 ->where('product_id', $productid)->where('order_id', $order_id)->first();
147
+                    ->where('product_id', $productid)->where('order_id', $order_id)->first();
148 148
             if ($updatesEndDate) {
149 149
                 foreach ($versions as $version) {
150 150
                     if ($version->created_at->toDateTimeString()
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
                                 return $model->grand_total;
482 482
                             })
483 483
                             ->rawColumns(['checkbox', 'number', 'total',
484
-                             'payment_method', 'payment_status', 'created_at', ])
484
+                                'payment_method', 'payment_status', 'created_at', ])
485 485
                             ->make(true);
486 486
         } catch (Exception $ex) {
487 487
             Bugsnag::notifyException($ex);
@@ -507,17 +507,17 @@  discard block
 block discarded – undo
507 507
                             ->addColumn('number', function ($model) {
508 508
                                 return $model->invoice()->first()->number;
509 509
                             })
510
-                              ->addColumn('total', function ($model) {
511
-                                  return $model->amount;
512
-                              })
513
-                               ->addColumn('created_at', function ($model) {
514
-                                   $date1 = new DateTime($model->created_at);
515
-                                   $tz = \Auth::user()->timezone()->first()->name;
516
-                                   $date1->setTimezone(new DateTimeZone($tz));
517
-                                   $date = $date1->format('M j, Y, g:i a');
518
-
519
-                                   return $date;
520
-                               })
510
+                                ->addColumn('total', function ($model) {
511
+                                    return $model->amount;
512
+                                })
513
+                                ->addColumn('created_at', function ($model) {
514
+                                    $date1 = new DateTime($model->created_at);
515
+                                    $tz = \Auth::user()->timezone()->first()->name;
516
+                                    $date1->setTimezone(new DateTimeZone($tz));
517
+                                    $date = $date1->format('M j, Y, g:i a');
518
+
519
+                                    return $date;
520
+                                })
521 521
 
522 522
                             ->addColumn('payment_method', 'payment_status', 'created_at')
523 523
 
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
                     ->select('number', 'created_at', 'grand_total', 'id', 'status');
80 80
 
81 81
             return \DataTables::of($invoices->get())
82
-                            ->addColumn('number', function ($model) {
82
+                            ->addColumn('number', function($model) {
83 83
                                 return $model->number;
84 84
                             })
85
-                            ->addColumn('date', function ($model) {
85
+                            ->addColumn('date', function($model) {
86 86
                                 $date = $model->created_at;
87 87
 
88 88
                                 return $date;
89 89
                             })
90
-                            ->addColumn('total', function ($model) {
90
+                            ->addColumn('total', function($model) {
91 91
                                 return $model->grand_total;
92 92
                             })
93
-                            ->addColumn('Action', function ($model) {
93
+                            ->addColumn('Action', function($model) {
94 94
                                 $status = $model->status;
95 95
                                 $payment = '';
96 96
                                 if ($status == 'Pending' && $model->grand_total > 0) {
@@ -155,19 +155,19 @@  discard block
 block discarded – undo
155 155
             }
156 156
 
157 157
             return \DataTables::of($versions)
158
-                            ->addColumn('id', function ($versions) {
158
+                            ->addColumn('id', function($versions) {
159 159
                                 return ucfirst($versions->id);
160 160
                             })
161
-                            ->addColumn('version', function ($versions) {
161
+                            ->addColumn('version', function($versions) {
162 162
                                 return ucfirst($versions->version);
163 163
                             })
164
-                            ->addColumn('title', function ($versions) {
164
+                            ->addColumn('title', function($versions) {
165 165
                                 return ucfirst($versions->title);
166 166
                             })
167
-                            ->addColumn('description', function ($versions) {
167
+                            ->addColumn('description', function($versions) {
168 168
                                 return ucfirst($versions->description);
169 169
                             })
170
-                            ->addColumn('file', function ($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
170
+                            ->addColumn('file', function($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
171 171
                                 $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first();
172 172
                                 $order = Order::where('invoice_id', '=', $invoice_id)->first();
173 173
                                 $order_id = $order->id;
@@ -264,18 +264,18 @@  discard block
 block discarded – undo
264 264
             }
265 265
 
266 266
             return \DataTables::of($link)
267
-                            ->addColumn('version', function ($link) {
267
+                            ->addColumn('version', function($link) {
268 268
                                 return ucfirst($link['tag_name']);
269 269
                             })
270
-                            ->addColumn('name', function ($link) {
270
+                            ->addColumn('name', function($link) {
271 271
                                 return ucfirst($link['name']);
272 272
                             })
273
-                            ->addColumn('description', function ($link) {
273
+                            ->addColumn('description', function($link) {
274 274
                                 $markdown = Markdown::convertToHtml(ucfirst($link['body']));
275 275
 
276 276
                                 return $markdown;
277 277
                             })
278
-                            ->addColumn('file', function ($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
278
+                            ->addColumn('file', function($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
279 279
                                 $order = Order::where('invoice_id', '=', $invoiceid)->first();
280 280
                                 $order_id = $order->id;
281 281
                                 $orderEndDate = Subscription::select('update_ends_at')
@@ -322,20 +322,20 @@  discard block
 block discarded – undo
322 322
             $orders = Order::where('client', \Auth::user()->id);
323 323
 
324 324
             return \DataTables::of($orders->get())
325
-                            ->addColumn('id', function ($model) {
325
+                            ->addColumn('id', function($model) {
326 326
                                 return $model->id;
327 327
                             })
328
-                            ->addColumn('product_name', function ($model) {
328
+                            ->addColumn('product_name', function($model) {
329 329
                                 return $model->product()->first()->name;
330 330
                             })
331
-                            ->addColumn('expiry', function ($model) {
331
+                            ->addColumn('expiry', function($model) {
332 332
                                 $tz = \Auth::user()->timezone()->first()->name;
333 333
                                 $end = $this->getExpiryDate($model);
334 334
 
335 335
                                 return $end;
336 336
                             })
337 337
 
338
-                            ->addColumn('Action', function ($model) {
338
+                            ->addColumn('Action', function($model) {
339 339
                                 $sub = $model->subscription()->first();
340 340
                                 $order = Order::where('id', $model->id)->select('product')->first();
341 341
                                 $productid = $order->product;
@@ -467,17 +467,17 @@  discard block
 block discarded – undo
467 467
                     ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at');
468 468
 
469 469
             return \DataTables::of($payments->get())
470
-                            ->addColumn('checkbox', function ($model) {
470
+                            ->addColumn('checkbox', function($model) {
471 471
                                 if (\Input::get('client') != 'true') {
472 472
                                     return "<input type='checkbox' class='payment_checkbox' 
473 473
                                     value=".$model->id.' name=select[] id=check>';
474 474
                                 }
475 475
                             })
476
-                            ->addColumn('number', function ($model) {
476
+                            ->addColumn('number', function($model) {
477 477
                                 return $model->invoice()->first()->number;
478 478
                             })
479 479
                             ->addColumn('amount', 'payment_method', 'payment_status', 'created_at')
480
-                            ->addColumn('total', function ($model) {
480
+                            ->addColumn('total', function($model) {
481 481
                                 return $model->grand_total;
482 482
                             })
483 483
                             ->rawColumns(['checkbox', 'number', 'total',
@@ -504,13 +504,13 @@  discard block
 block discarded – undo
504 504
                     ->select('id', 'invoice_id', 'user_id', 'payment_method', 'payment_status', 'created_at', 'amount');
505 505
             //dd(\Input::all());
506 506
             return \DataTables::of($payments->get())
507
-                            ->addColumn('number', function ($model) {
507
+                            ->addColumn('number', function($model) {
508 508
                                 return $model->invoice()->first()->number;
509 509
                             })
510
-                              ->addColumn('total', function ($model) {
510
+                              ->addColumn('total', function($model) {
511 511
                                   return $model->amount;
512 512
                               })
513
-                               ->addColumn('created_at', function ($model) {
513
+                               ->addColumn('created_at', function($model) {
514 514
                                    $date1 = new DateTime($model->created_at);
515 515
                                    $tz = \Auth::user()->timezone()->first()->name;
516 516
                                    $date1->setTimezone(new DateTimeZone($tz));
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -177,11 +177,13 @@
 block discarded – undo
177 177
 
178 178
                                 //if product has Update expiry date ie subscription is generated
179 179
                                 if ($updateEndDate) {
180
-                                    if ($downloadPermission['allowDownloadTillExpiry'] == 1) {//Perpetual download till expiry permission selected
180
+                                    if ($downloadPermission['allowDownloadTillExpiry'] == 1) {
181
+//Perpetual download till expiry permission selected
181 182
                                         $getDownload = $this->whenDownloadTillExpiry($updateEndDate, $productid, $versions, $clientid, $invoiceid);
182 183
 
183 184
                                         return $getDownload;
184
-                                    } elseif ($downloadPermission['allowDownloadTillExpiry'] == 0) {//When download retires after subscription
185
+                                    } elseif ($downloadPermission['allowDownloadTillExpiry'] == 0) {
186
+//When download retires after subscription
185 187
                                         $getDownload = $this->whenDownloadExpiresAfterExpiry($countExpiry, $countVersions, $updateEndDate, $productid, $versions, $clientid, $invoiceid);
186 188
 
187 189
                                         return $getDownload;
Please login to merge, or discard this patch.
app/Http/Controllers/Front/CartController.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
 
153 153
                 if (count($tax_class_id) > 0) {//If the product is allowed for tax (Check in tax_product relation table)
154 154
                     if ($tax_enable == 1) {//If GST is Enabled
155
-                         $details = $this->getDetailsWhenUserStateIsIndian($user_state, $origin_state,
156
-                          $productid, $geoip_state, $geoip_country);
155
+                            $details = $this->getDetailsWhenUserStateIsIndian($user_state, $origin_state,
156
+                            $productid, $geoip_state, $geoip_country);
157 157
                         $c_gst = $details['cgst'];
158 158
                         $s_gst = $details['sgst'];
159 159
                         $i_gst = $details['igst'];
@@ -168,21 +168,21 @@  discard block
 block discarded – undo
168 168
                             //All the da a attribute that is sent to the checkout Page if tax_compound=0
169 169
                             if ($taxes[0]) {
170 170
                                 $tax_attribute[$key] = ['name' => $tax->name, 'c_gst'=>$c_gst,
171
-                               's_gst'                         => $s_gst, 'i_gst'=>$i_gst, 'ut_gst'=>$ut_gst,
171
+                                's_gst'                         => $s_gst, 'i_gst'=>$i_gst, 'ut_gst'=>$ut_gst,
172 172
                                 'state'                        => $state_code, 'origin_state'=>$origin_state,
173
-                                 'tax_enable'                  => $tax_enable, 'rate'=>$value, 'status'=>$status, ];
173
+                                    'tax_enable'                  => $tax_enable, 'rate'=>$value, 'status'=>$status, ];
174 174
 
175 175
                                 $taxCondition[0] = new \Darryldecode\Cart\CartCondition([
176 176
                                             'name'   => 'no compound', 'type'   => 'tax',
177 177
                                             'target' => 'item', 'value'  => $value,
178
-                                          ]);
178
+                                            ]);
179 179
                             } else {
180 180
                                 $tax_attribute[0] = ['name' => 'null', 'rate' => 0, 'tax_enable' =>0];
181 181
                                 $taxCondition[0] = new \Darryldecode\Cart\CartCondition([
182
-                                           'name'   => 'null', 'type'   => 'tax',
183
-                                           'target' => 'item', 'value'  => '0%',
184
-                                           'rate'   => 0, 'tax_enable' =>0,
185
-                                         ]);
182
+                                            'name'   => 'null', 'type'   => 'tax',
183
+                                            'target' => 'item', 'value'  => '0%',
184
+                                            'rate'   => 0, 'tax_enable' =>0,
185
+                                            ]);
186 186
                             }
187 187
                         }
188 188
                     } elseif ($tax_enable == 0) {//If Tax enable is 0 and other tax is available
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         $value = '';
268 268
         $value = $taxes->toArray()[0]['active'] ?
269 269
              (TaxProductRelation::where('product_id', $productid)
270
-              ->where('tax_class_id', $taxClassId)->count() ? $ut_gst + $c_gst.'%' : 0) : 0;
270
+                ->where('tax_class_id', $taxClassId)->count() ? $ut_gst + $c_gst.'%' : 0) : 0;
271 271
 
272 272
         return $value;
273 273
     }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
         $otherRate = 0;
285 285
         $status = $taxes->toArray()[0]['active'];
286 286
         if ($status && (TaxProductRelation::where('product_id', $productid)
287
-          ->where('tax_class_id', $taxClassId)->count() > 0)) {
287
+            ->where('tax_class_id', $taxClassId)->count() > 0)) {
288 288
             $otherRate = Tax::where('tax_classes_id', $taxClassId)->first()->rate;
289 289
         }
290 290
         $value = $otherRate.'%';
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
             $subregion = \App\Model\Common\State::where('state_subdivision_code', $code)->first();
492 492
             if ($subregion) {
493 493
                 $result = ['id' => $subregion->state_subdivision_code,
494
-                 'name'         => $subregion->state_subdivision_name, ];
494
+                    'name'         => $subregion->state_subdivision_name, ];
495 495
             }
496 496
 
497 497
             return $result;
Please login to merge, or discard this patch.
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,7 +71,8 @@  discard block
 block discarded – undo
71 71
     {
72 72
         try {
73 73
             $plan = '';
74
-            if ($request->has('subscription')) {//put he Plan id sent into session variable
74
+            if ($request->has('subscription')) {
75
+//put he Plan id sent into session variable
75 76
                 $plan = $request->get('subscription');
76 77
                 Session::put('plan', $plan);
77 78
             }
@@ -102,7 +103,8 @@  discard block
 block discarded – undo
102 103
             foreach ($cartCollection as $item) {
103 104
                 $attributes[] = $item->attributes;
104 105
                 $cart_currency = $attributes[0]['currency']['currency'];
105
-                if (\Auth::user()) {//If User is Loggen in and his currency changes after logginng in then remove his previous order from cart
106
+                if (\Auth::user()) {
107
+//If User is Loggen in and his currency changes after logginng in then remove his previous order from cart
106 108
                     $currency = \Auth::user()->currency;
107 109
                     if ($cart_currency != $currency) {
108 110
                         $id = $item->id;
@@ -150,8 +152,10 @@  discard block
 block discarded – undo
150 152
                 $origin_state = $this->setting->first()->state; //Get the State of origin
151 153
                 $tax_class_id = TaxProductRelation::where('product_id', $productid)->pluck('tax_class_id')->toArray();
152 154
 
153
-                if (count($tax_class_id) > 0) {//If the product is allowed for tax (Check in tax_product relation table)
154
-                    if ($tax_enable == 1) {//If GST is Enabled
155
+                if (count($tax_class_id) > 0) {
156
+//If the product is allowed for tax (Check in tax_product relation table)
157
+                    if ($tax_enable == 1) {
158
+//If GST is Enabled
155 159
                          $details = $this->getDetailsWhenUserStateIsIndian($user_state, $origin_state,
156 160
                           $productid, $geoip_state, $geoip_country);
157 161
                         $c_gst = $details['cgst'];
@@ -185,7 +189,8 @@  discard block
 block discarded – undo
185 189
                                          ]);
186 190
                             }
187 191
                         }
188
-                    } elseif ($tax_enable == 0) {//If Tax enable is 0 and other tax is available
192
+                    } elseif ($tax_enable == 0) {
193
+//If Tax enable is 0 and other tax is available
189 194
                         $details = $this->whenOtherTaxAvailableAndTaxNotEnable($taxClassId, $productid, $geoip_state, $geoip_country);
190 195
                         $taxes = $details['taxes'];
191 196
                         $value = $details['value'];
@@ -581,7 +586,8 @@  discard block
 block discarded – undo
581 586
         try {
582 587
             $currency = Setting::find(1)->default_currency;
583 588
             $currency_symbol = Setting::find(1)->default_symbol;
584
-            if (!\Auth::user()) {//When user is not logged in
589
+            if (!\Auth::user()) {
590
+//When user is not logged in
585 591
                 $cont = new \App\Http\Controllers\Front\PageController();
586 592
                 $location = $cont->getLocation();
587 593
                 $country = self::findCountryByGeoip($location['iso_code']);
@@ -596,7 +602,8 @@  discard block
 block discarded – undo
596 602
                 $currency = \Auth::user()->currency;
597 603
                 $currency_symbol = \Auth::user()->currency_symbol;
598 604
             }
599
-            if ($userid != '') {//For Admin Panel Clients
605
+            if ($userid != '') {
606
+//For Admin Panel Clients
600 607
                 $currencyAndSymbol = $this->getCurrency($userid);
601 608
                 $currency = $currencyAndSymbol['currency'];
602 609
                 $currency_symbol = $currencyAndSymbol['symbol'];
Please login to merge, or discard this patch.
app/Http/Controllers/HomeController.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             $serial_key = $this->checkSerialKey($faveo_encrypted_key, $order_number);
96 96
 
97 97
             \Log::emergency(json_encode(['domain' => $request->input('domain'),
98
-             'serial'                             => $serial_key, 'order' => $order_number, ]));
98
+                'serial'                             => $serial_key, 'order' => $order_number, ]));
99 99
             $result = [];
100 100
             if ($request_type == 'install') {
101 101
                 $result = $this->verificationResult($order_number, $serial_key);
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
             // $faveo_encrypted_key = self::decryptByFaveoPrivateKey($request->input('serial_key'));
349 349
             // $faveo_encrypted_domain = self::decryptByFaveoPrivateKey($request->input('domain'));
350 350
             $this_order = $order
351
-                     ->where('number', $faveo_encrypted_order_number)
351
+                        ->where('number', $faveo_encrypted_order_number)
352 352
                     // ->where('number', $request->input('order_number'))
353 353
                     //->where('serial_key', $faveo_encrypted_key)
354 354
                     //->where('domain', $faveo_encrypted_domain)
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
     public function checkUpdatesExpiry(Request $request)
401 401
     {
402 402
         $v = \Validator::make($request->all(), [
403
-          'order_number' => 'required',
403
+            'order_number' => 'required',
404 404
         ]);
405 405
         if ($v->fails()) {
406 406
             $error = $v->errors();
Please login to merge, or discard this patch.
app/Http/Controllers/License/LicensePermissionsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,20 +44,20 @@  discard block
 block discarded – undo
44 44
             $licenseType = LicenseType::select('id', 'name')->get();
45 45
 
46 46
             return \DataTables::of($licenseType)
47
-            ->addColumn('checkbox', function ($model) {
47
+            ->addColumn('checkbox', function($model) {
48 48
                 return "<input type='checkbox' class='type_checkbox' 
49 49
             value=".$model->id.' name=select[] id=check>';
50 50
             })
51
-            ->addColumn('license_type', function ($model) {
51
+            ->addColumn('license_type', function($model) {
52 52
                 return ucfirst($model->name);
53 53
             })
54
-            ->addColumn('permissions', function ($model) {
54
+            ->addColumn('permissions', function($model) {
55 55
                 $permissions = $model->permissions->pluck('permissions');
56 56
                 $allPermissions = $this->showPermissions($permissions);
57 57
 
58 58
                 return $allPermissions;
59 59
             })
60
-            ->addColumn('action', function ($model) {
60
+            ->addColumn('action', function($model) {
61 61
                 $selectedPermission = $model->permissions->pluck('id');
62 62
 
63 63
                 return "<p><button data-toggle='modal' 
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
                     $downloadPermission = 1; //Has Permission for Download
168 168
                 }
169 169
                 if ($permission == 'No Permissions') {
170
-                    $noPermissions = 1;  //Has No Permission
170
+                    $noPermissions = 1; //Has No Permission
171 171
                 }
172 172
                 if ($permission == 'Allow Downloads Before Updates Expire') {
173
-                    $allowDownloadTillExpiry = 1;  //allow download after Expiry
173
+                    $allowDownloadTillExpiry = 1; //allow download after Expiry
174 174
                 }
175 175
             }
176 176
 
Please login to merge, or discard this patch.
app/Http/Controllers/License/LicenseSettingsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@
 block discarded – undo
38 38
             $allTypes = $this->licenseType->select('id', 'name')->get();
39 39
 
40 40
             return \DataTables::of($allTypes)
41
-            ->addColumn('checkbox', function ($model) {
41
+            ->addColumn('checkbox', function($model) {
42 42
                 return "<input type='checkbox' class='type_checkbox' 
43 43
             value=".$model->id.' name=select[] id=check>';
44 44
             })
45
-            ->addColumn('type_name', function ($model) {
45
+            ->addColumn('type_name', function($model) {
46 46
                 return ucfirst($model->name);
47 47
             })
48
-            ->addColumn('action', function ($model) {
48
+            ->addColumn('action', function($model) {
49 49
                 return "<p><button data-toggle='modal' 
50 50
              data-id=".$model->id." data-name= '$model->name' 
51 51
              class='btn btn-sm btn-primary btn-xs editType'><i class='fa fa-edit'
Please login to merge, or discard this patch.
app/Http/Controllers/License/LicenseController.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,8 @@  discard block
 block discarded – undo
84 84
             $getProductId = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=search
85 85
             &search_type=product&search_keyword=$product_sku");
86 86
             $details = json_decode($getProductId);
87
-            if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if Product_sku is updated
87
+            if ($details->api_error_detected == 0 && is_array($details->page_message)) {
88
+//This is not true if Product_sku is updated
88 89
                 $productId = $details->page_message[0]->product_id;
89 90
             }
90 91
 
@@ -120,7 +121,8 @@  discard block
 block discarded – undo
120 121
       &search_type=client&search_keyword=$email");
121 122
 
122 123
         $details = json_decode($getUserId);
123
-        if ($details->api_error_detected == 0 && is_array($details->page_message)) {//This is not true if email is updated
124
+        if ($details->api_error_detected == 0 && is_array($details->page_message)) {
125
+//This is not true if email is updated
124 126
             $userId = $details->page_message[0]->client_id;
125 127
         }
126 128
 
Please login to merge, or discard this patch.