Completed
Push — development ( 73f0fe...9c710c )
by Ashutosh
10:16
created
app/Http/Controllers/Common/BaseTemplateController.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@
 block discarded – undo
25 25
             $currencyAndSymbol = $cart_controller->currency();
26 26
             $currency = $currencyAndSymbol['currency'];
27 27
             $symbol = $currencyAndSymbol['symbol'];
28
-            if ($symbol == '') {  //If user has no currency symbol(In case of old customers)
28
+            if ($symbol == '') {
29
+//If user has no currency symbol(In case of old customers)
29 30
                 $symbol = Currency::where('code', $currency)->pluck('symbol')->first();
30 31
                 $symbol = \Auth::user()->update(['currency_symbol'=> $symbol]);
31 32
             }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 {
11 11
     public function getPrice($months, $price, $priceDescription, $value, $cost, $currency)
12 12
     {
13
-         $price1 = currency_format($cost, $code = 'INR');
13
+            $price1 = currency_format($cost, $code = 'INR');
14 14
         $price[$value->id] = $months.'  '.$price1.' '.$priceDescription;
15 15
         return $price;
16 16
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/BaseSettingsController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -435,7 +435,7 @@
 block discarded – undo
435 435
 
436 436
         StatusSetting::where('id', 1)->update(['recaptcha_status'=>$status]);
437 437
         ApiKey::where('id', 1)->update(['nocaptcha_sitekey'=> $nocaptcha_sitekey,
438
-         'captcha_secretCheck'                             => $captcha_secretCheck, ]);
438
+            'captcha_secretCheck'                             => $captcha_secretCheck, ]);
439 439
 
440 440
         return ['message' => 'success', 'update'=>'Recaptcha Settings Updated'];
441 441
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@
 block discarded – undo
296 296
 
297 297
         // validate detected / default PHP CLI
298 298
         // Because array_filter() preserves keys, you should consider the resulting array to be an associative array even if the original array had integer keys for there may be holes in your sequence of keys. This means that, for example, json_encode() will convert your result array into an object instead of an array. Call array_values() on the result array to guarantee json_encode() gives you an array.
299
-        $paths = array_values(array_filter($paths, function ($path) {
299
+        $paths = array_values(array_filter($paths, function($path) {
300 300
             return is_executable($path) && preg_match("/php[0-9\.a-z]{0,3}$/i", $path);
301 301
         }));
302 302
 
Please login to merge, or discard this patch.
app/Http/Controllers/Common/PaymentSettingsController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
                         ->addColumn('version', function ($model) {
88 88
                             return $model['version'];
89 89
                         })
90
-                      ->rawColumns(['name', 'description', 'author', 'website', 'version'])
90
+                        ->rawColumns(['name', 'description', 'author', 'website', 'version'])
91 91
                             ->make(true);
92 92
     }
93 93
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
         return \DataTables::of(new Collection($plugins))
17 17
                         // ->searchColumns('name')
18
-                        ->addColumn('name', function ($model) {
18
+                        ->addColumn('name', function($model) {
19 19
                             if (array_has($model, 'path')) {
20 20
                                 if ($model['status'] == 0) {
21 21
                                     $activate = '<a href='.url('plugin/status/'.$model['name']).'>Activate</a>';
@@ -51,16 +51,16 @@  discard block
 block discarded – undo
51 51
 
52 52
                             return ucfirst($model['name']).$action;
53 53
                         })
54
-                        ->addColumn('description', function ($model) {
54
+                        ->addColumn('description', function($model) {
55 55
                             return $model['description'];
56 56
                         })
57
-                        ->addColumn('author', function ($model) {
57
+                        ->addColumn('author', function($model) {
58 58
                             return ucfirst($model['author']);
59 59
                         })
60
-                        ->addColumn('website', function ($model) {
60
+                        ->addColumn('website', function($model) {
61 61
                             return '<a href='.$model['website'].' target=_blank>'.$model['website'].'</a>';
62 62
                         })
63
-                        ->addColumn('version', function ($model) {
63
+                        ->addColumn('version', function($model) {
64 64
                             return $model['version'];
65 65
                         })
66 66
                       ->rawColumns(['name', 'description', 'author', 'website', 'version'])
Please login to merge, or discard this patch.
app/Http/Controllers/Common/SettingsController.php 3 patches
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -279,37 +279,37 @@  discard block
 block discarded – undo
279 279
             $query = $this->advanceSearch($from, $till, $delFrom, $delTill);
280 280
 
281 281
             return \DataTables::of($query->take(50))
282
-             ->setTotalRecords($query->count())
283
-             ->addColumn('checkbox', function ($model) {
284
-                 return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
285
-             })
286
-                           ->addColumn('name', function ($model) {
287
-                               return ucfirst($model->log_name);
288
-                           })
289
-                             ->addColumn('description', function ($model) {
290
-                                 return ucfirst($model->description);
291
-                             })
292
-                          ->addColumn('username', function ($model) {
293
-                              $causer_id = $model->causer_id;
294
-                              $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
295
-                              foreach ($names as $key => $value) {
296
-                                  $fullName = $key.' '.$value;
297
-
298
-                                  return $fullName;
299
-                              }
300
-                          })
301
-                              ->addColumn('role', function ($model) {
302
-                                  $causer_id = $model->causer_id;
303
-                                  $role = User::where('id', $causer_id)->pluck('role');
304
-
305
-                                  return json_decode($role);
306
-                              })
307
-                               ->addColumn('new', function ($model) {
308
-                                   $properties = ($model->properties);
309
-                                   $newEntry = $this->getNewEntry($properties, $model);
310
-
311
-                                   return $newEntry;
312
-                               })
282
+                ->setTotalRecords($query->count())
283
+                ->addColumn('checkbox', function ($model) {
284
+                    return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
285
+                })
286
+                            ->addColumn('name', function ($model) {
287
+                                return ucfirst($model->log_name);
288
+                            })
289
+                                ->addColumn('description', function ($model) {
290
+                                    return ucfirst($model->description);
291
+                                })
292
+                            ->addColumn('username', function ($model) {
293
+                                $causer_id = $model->causer_id;
294
+                                $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
295
+                                foreach ($names as $key => $value) {
296
+                                    $fullName = $key.' '.$value;
297
+
298
+                                    return $fullName;
299
+                                }
300
+                            })
301
+                                ->addColumn('role', function ($model) {
302
+                                    $causer_id = $model->causer_id;
303
+                                    $role = User::where('id', $causer_id)->pluck('role');
304
+
305
+                                    return json_decode($role);
306
+                                })
307
+                                ->addColumn('new', function ($model) {
308
+                                    $properties = ($model->properties);
309
+                                    $newEntry = $this->getNewEntry($properties, $model);
310
+
311
+                                    return $newEntry;
312
+                                })
313 313
                                 ->addColumn('old', function ($model) {
314 314
                                     $data = ($model->properties);
315 315
                                     $oldEntry = $this->getOldEntry($data, $model);
@@ -354,39 +354,39 @@  discard block
 block discarded – undo
354 354
             $email_log = \DB::table('email_log')->get();
355 355
 
356 356
             return\ DataTables::of($email_log)
357
-             ->addColumn('checkbox', function ($model) {
358
-                 return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
359
-             })
360
-                           ->addColumn('date', function ($model) {
361
-                               return ucfirst($model->date);
362
-                           })
363
-                             ->addColumn('from', function ($model) {
364
-                                 $from = Markdown::convertToHtml(ucfirst($model->from));
365
-
366
-                                 return $from;
367
-                             })
368
-                              ->addColumn('to', function ($model) {
369
-                                  $to = Markdown::convertToHtml(ucfirst($model->to));
370
-
371
-                                  return $to;
372
-                              })
373
-                             ->addColumn('cc', function ($model) {
374
-                                 $cc = '--';
375
-
376
-                                 return $cc;
377
-                             })
378
-
379
-                               ->addColumn('subject', function ($model) {
380
-                                   return ucfirst($model->subject);
381
-                               })
357
+                ->addColumn('checkbox', function ($model) {
358
+                    return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
359
+                })
360
+                            ->addColumn('date', function ($model) {
361
+                                return ucfirst($model->date);
362
+                            })
363
+                                ->addColumn('from', function ($model) {
364
+                                    $from = Markdown::convertToHtml(ucfirst($model->from));
365
+
366
+                                    return $from;
367
+                                })
368
+                                ->addColumn('to', function ($model) {
369
+                                    $to = Markdown::convertToHtml(ucfirst($model->to));
370
+
371
+                                    return $to;
372
+                                })
373
+                                ->addColumn('cc', function ($model) {
374
+                                    $cc = '--';
375
+
376
+                                    return $cc;
377
+                                })
378
+
379
+                                ->addColumn('subject', function ($model) {
380
+                                    return ucfirst($model->subject);
381
+                                })
382 382
                                 ->addColumn('headers', function ($model) {
383 383
                                     $headers = Markdown::convertToHtml(ucfirst($model->headers));
384 384
 
385 385
                                     return $headers;
386 386
                                 })
387
-                              ->addColumn('status', function ($model) {
388
-                                  return ucfirst($model->status);
389
-                              })
387
+                                ->addColumn('status', function ($model) {
388
+                                    return ucfirst($model->status);
389
+                                })
390 390
 
391 391
                             ->rawColumns(['checkbox', 'date', 'from', 'to', 'cc',
392 392
                                 'bcc', 'subject', 'headers', 'status', ])
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,8 @@
 block discarded – undo
96 96
                     $pluginName[] = $plugin->name; //get the name of active plugin
97 97
                 }
98 98
 
99
-                if (count($models) > 0) {//If more than 1 plugin is active it will check the currencies allowed for that plugin.If the currencies allowed matches the passed arguement(currency),that plugin name is returned
99
+                if (count($models) > 0) {
100
+//If more than 1 plugin is active it will check the currencies allowed for that plugin.If the currencies allowed matches the passed arguement(currency),that plugin name is returned
100 101
                     for ($i = 0; $i < count($pluginName); $i++) {
101 102
                         $currencies = explode(',', $models[$i]->currencies);
102 103
                         if (in_array($currency, $currencies)) {
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $mobileauthkey = $apikeys->pluck('msg91_auth_key')->first();
68 68
             $updateUrl = $apikeys->pluck('update_api_url')->first();
69 69
             $emailStatus = StatusSetting::pluck('emailverification_status')->first();
70
-            $twitterKeys = $apikeys->select('twitter_consumer_key','twitter_consumer_secret',
70
+            $twitterKeys = $apikeys->select('twitter_consumer_key', 'twitter_consumer_secret',
71 71
                 'twitter_access_token', 'access_tooken_secret')->first();
72 72
             $twitterStatus = $this->statusSetting->pluck('twitter_status')->first();
73 73
             $zohoStatus = $this->statusSetting->pluck('zoho_status')->first();
@@ -299,16 +299,16 @@  discard block
 block discarded – undo
299 299
 
300 300
             return \DataTables::of($query->take(50))
301 301
              ->setTotalRecords($query->count())
302
-             ->addColumn('checkbox', function ($model) {
302
+             ->addColumn('checkbox', function($model) {
303 303
                  return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
304 304
              })
305
-                           ->addColumn('name', function ($model) {
305
+                           ->addColumn('name', function($model) {
306 306
                                return ucfirst($model->log_name);
307 307
                            })
308
-                             ->addColumn('description', function ($model) {
308
+                             ->addColumn('description', function($model) {
309 309
                                  return ucfirst($model->description);
310 310
                              })
311
-                          ->addColumn('username', function ($model) {
311
+                          ->addColumn('username', function($model) {
312 312
                               $causer_id = $model->causer_id;
313 313
                               $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
314 314
                               foreach ($names as $key => $value) {
@@ -317,41 +317,41 @@  discard block
 block discarded – undo
317 317
                                   return $fullName;
318 318
                               }
319 319
                           })
320
-                              ->addColumn('role', function ($model) {
320
+                              ->addColumn('role', function($model) {
321 321
                                   $causer_id = $model->causer_id;
322 322
                                   $role = User::where('id', $causer_id)->pluck('role');
323 323
 
324 324
                                   return json_decode($role);
325 325
                               })
326
-                               ->addColumn('new', function ($model) {
326
+                               ->addColumn('new', function($model) {
327 327
                                    $properties = ($model->properties);
328 328
                                    $newEntry = $this->getNewEntry($properties, $model);
329 329
 
330 330
                                    return $newEntry;
331 331
                                })
332
-                                ->addColumn('old', function ($model) {
332
+                                ->addColumn('old', function($model) {
333 333
                                     $data = ($model->properties);
334 334
                                     $oldEntry = $this->getOldEntry($data, $model);
335 335
 
336 336
                                     return $oldEntry;
337 337
                                 })
338
-                                ->addColumn('created_at', function ($model) {
338
+                                ->addColumn('created_at', function($model) {
339 339
                                     $newDate = $this->getDate($model->created_at);
340 340
 
341 341
                                     return $newDate;
342 342
                                 })
343 343
 
344
-                                    ->filterColumn('log_name', function ($query, $keyword) {
344
+                                    ->filterColumn('log_name', function($query, $keyword) {
345 345
                                         $sql = 'log_name like ?';
346 346
                                         $query->whereRaw($sql, ["%{$keyword}%"]);
347 347
                                     })
348 348
 
349
-                                ->filterColumn('description', function ($query, $keyword) {
349
+                                ->filterColumn('description', function($query, $keyword) {
350 350
                                     $sql = 'description like ?';
351 351
                                     $query->whereRaw($sql, ["%{$keyword}%"]);
352 352
                                 })
353 353
 
354
-                            ->filterColumn('causer_id', function ($query, $keyword) {
354
+                            ->filterColumn('causer_id', function($query, $keyword) {
355 355
                                 $sql = 'first_name like ?';
356 356
                                 $query->whereRaw($sql, ["%{$keyword}%"]);
357 357
                             })
@@ -373,37 +373,37 @@  discard block
 block discarded – undo
373 373
             $email_log = \DB::table('email_log')->get();
374 374
 
375 375
             return\ DataTables::of($email_log)
376
-             ->addColumn('checkbox', function ($model) {
376
+             ->addColumn('checkbox', function($model) {
377 377
                  return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
378 378
              })
379
-                           ->addColumn('date', function ($model) {
379
+                           ->addColumn('date', function($model) {
380 380
                                return ucfirst($model->date);
381 381
                            })
382
-                             ->addColumn('from', function ($model) {
382
+                             ->addColumn('from', function($model) {
383 383
                                  $from = Markdown::convertToHtml(ucfirst($model->from));
384 384
 
385 385
                                  return $from;
386 386
                              })
387
-                              ->addColumn('to', function ($model) {
387
+                              ->addColumn('to', function($model) {
388 388
                                   $to = Markdown::convertToHtml(ucfirst($model->to));
389 389
 
390 390
                                   return $to;
391 391
                               })
392
-                             ->addColumn('cc', function ($model) {
392
+                             ->addColumn('cc', function($model) {
393 393
                                  $cc = '--';
394 394
 
395 395
                                  return $cc;
396 396
                              })
397 397
 
398
-                               ->addColumn('subject', function ($model) {
398
+                               ->addColumn('subject', function($model) {
399 399
                                    return ucfirst($model->subject);
400 400
                                })
401
-                                ->addColumn('headers', function ($model) {
401
+                                ->addColumn('headers', function($model) {
402 402
                                     $headers = Markdown::convertToHtml(ucfirst($model->headers));
403 403
 
404 404
                                     return $headers;
405 405
                                 })
406
-                              ->addColumn('status', function ($model) {
406
+                              ->addColumn('status', function($model) {
407 407
                                   return ucfirst($model->status);
408 408
                               })
409 409
 
Please login to merge, or discard this patch.
app/Http/Controllers/Product/PlanController.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -87,22 +87,22 @@  discard block
 block discarded – undo
87 87
 
88 88
                             return ucfirst($response);
89 89
                         })
90
-                         ->addColumn('price', function ($model) use ($defaultCurrency) {
91
-                             $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
90
+                            ->addColumn('price', function ($model) use ($defaultCurrency) {
91
+                                $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
92 92
                             ->pluck('add_price')->first();
93
-                             if ($price != null) {
94
-                                 return $price;
95
-                             } else {
96
-                                 return 'Not Available';
97
-                             }
98
-                         })
99
-                         ->addColumn('currency', function ($model) use ($defaultCurrency) {
100
-                             if ($defaultCurrency && $defaultCurrency != null) {
101
-                                 return $defaultCurrency;
102
-                             } else {
103
-                                 return 'Not Available';
104
-                             }
105
-                         })
93
+                                if ($price != null) {
94
+                                    return $price;
95
+                                } else {
96
+                                    return 'Not Available';
97
+                                }
98
+                            })
99
+                            ->addColumn('currency', function ($model) use ($defaultCurrency) {
100
+                                if ($defaultCurrency && $defaultCurrency != null) {
101
+                                    return $defaultCurrency;
102
+                                } else {
103
+                                    return 'Not Available';
104
+                                }
105
+                            })
106 106
                         ->addColumn('action', function ($model) {
107 107
                             return '<a href='.url('plans/'.$model->id.'/edit')." 
108 108
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' 
@@ -206,10 +206,10 @@  discard block
 block discarded – undo
206 206
         $agentQuantity = $plan->planPrice->first()->no_of_agents;
207 207
         foreach ($products as $key => $product) {
208 208
             $selectedProduct = $this->product->where('id', $plan->product)
209
-          ->pluck('name', 'id', 'subscription')->toArray();
209
+            ->pluck('name', 'id', 'subscription')->toArray();
210 210
         }
211 211
         $selectedPeriods = $this->period->where('days', $plan->days)
212
-       ->pluck('name', 'days')->toArray();
212
+        ->pluck('name', 'days')->toArray();
213 213
 
214 214
         return view(
215 215
             'themes.default1.product.plan.edit',
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
             'name'                => 'required',
248 248
             'add_price.*'         => 'required',
249 249
             'product'             => 'required',
250
-              'days'              => $days_rule.'numeric',
251
-               'product_quantity' => 'required_without:no_of_agents|integer|min:0',
250
+                'days'              => $days_rule.'numeric',
251
+                'product_quantity' => 'required_without:no_of_agents|integer|min:0',
252 252
             'no_of_agents'        => 'required_without:product_quantity|integer|min:0',
253 253
         ]);
254 254
         $product_quantity = $request->input('product_quantity');
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
         $defaultCurrency = Setting::where('id', 1)->value('default_currency');
62 62
 
63 63
         return\ DataTables::of($new_plan)
64
-                        ->addColumn('checkbox', function ($model) {
64
+                        ->addColumn('checkbox', function($model) {
65 65
                             return "<input type='checkbox' class='plan_checkbox' 
66 66
                             value=".$model->id.' name=select[] id=check>';
67 67
                         })
68
-                        ->addColumn('name', function ($model) {
68
+                        ->addColumn('name', function($model) {
69 69
                             return ucfirst($model->name);
70 70
                         })
71
-                        ->addColumn('days', function ($model) {
71
+                        ->addColumn('days', function($model) {
72 72
                             if ($model->days != '') {
73 73
                                 $months = $model->days / 30;
74 74
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
                             return 'Not Available';
79 79
                         })
80
-                        ->addColumn('product', function ($model) {
80
+                        ->addColumn('product', function($model) {
81 81
                             $productid = $model->product;
82 82
                             $product = $this->product->where('id', $productid)->first();
83 83
                             $response = '';
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
                             return ucfirst($response);
89 89
                         })
90
-                         ->addColumn('price', function ($model) use ($defaultCurrency) {
90
+                         ->addColumn('price', function($model) use ($defaultCurrency) {
91 91
                              $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
92 92
                             ->pluck('add_price')->first();
93 93
                              if ($price != null) {
@@ -96,14 +96,14 @@  discard block
 block discarded – undo
96 96
                                  return 'Not Available';
97 97
                              }
98 98
                          })
99
-                         ->addColumn('currency', function ($model) use ($defaultCurrency) {
99
+                         ->addColumn('currency', function($model) use ($defaultCurrency) {
100 100
                              if ($defaultCurrency && $defaultCurrency != null) {
101 101
                                  return $defaultCurrency;
102 102
                              } else {
103 103
                                  return 'Not Available';
104 104
                              }
105 105
                          })
106
-                        ->addColumn('action', function ($model) {
106
+                        ->addColumn('action', function($model) {
107 107
                             return '<a href='.url('plans/'.$model->id.'/edit')." 
108 108
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' 
109 109
                             style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ExtendedBaseProductController.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -19,28 +19,28 @@
 block discarded – undo
19 19
         ->get();
20 20
 
21 21
         return \DataTables::of($new_upload)
22
-        ->addColumn('checkbox', function ($model) {
22
+        ->addColumn('checkbox', function($model) {
23 23
             return "<input type='checkbox' class='upload_checkbox' value=".$model->id.' name=select[] id=checks>';
24 24
         })
25 25
 
26
-        ->addColumn('product_id', function ($model) {
26
+        ->addColumn('product_id', function($model) {
27 27
             return ucfirst($this->product->where('id', $model->product_id)->first()->name);
28 28
         })
29 29
 
30
-        ->addColumn('title', function ($model) {
30
+        ->addColumn('title', function($model) {
31 31
             return ucfirst($model->title);
32 32
         })
33
-        ->addColumn('description', function ($model) {
33
+        ->addColumn('description', function($model) {
34 34
             return ucfirst($model->description);
35 35
         })
36
-        ->addColumn('version', function ($model) {
36
+        ->addColumn('version', function($model) {
37 37
             return $model->version;
38 38
         })
39 39
 
40
-        ->addColumn('file', function ($model) {
40
+        ->addColumn('file', function($model) {
41 41
             return $model->file;
42 42
         })
43
-        ->addColumn('action', function ($model) {
43
+        ->addColumn('action', function($model) {
44 44
             return '<a href='.('#edit-upload-option/'.$model->id).' 
45 45
          class=" btn btn-sm btn-primary " data-title="'.$model->title.'"
46 46
           data-description="'.$model->description.'" data-version="'
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
             return '<a href='.('#edit-upload-option/'.$model->id).' 
45 45
          class=" btn btn-sm btn-primary " data-title="'.$model->title.'"
46 46
           data-description="'.$model->description.'" data-version="'
47
-              .$model->version.'" data-id="'.$model->id.'" data-file="'.$model->file.'"onclick="openEditPopup(this)" >Edit</a>';
47
+                .$model->version.'" data-id="'.$model->id.'" data-file="'.$model->file.'"onclick="openEditPopup(this)" >Edit</a>';
48 48
         })
49 49
         ->rawcolumns(['checkbox', 'product_id', 'title', 'description', 'version', 'file', 'action'])
50 50
         ->make(true);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             if ($product->require_domain == 1) {
104 104
                 $field .= "<div class='col-md-4 form-group'>
105 105
                         <label class='required'>"./* @scrutinizer ignore-type */
106
-                         \Lang::get('message.domain')."</label>
106
+                            \Lang::get('message.domain')."</label>
107 107
                         <input type='text' name='domain' class='form-control' 
108 108
                         id='domain' placeholder='http://example.com'>
109 109
                 </div>";
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@
 block discarded – undo
62 62
             $file_upload = ProductUpload::find($id);
63 63
             $file_upload->update(['title'=>$request->input('producttitle'), 'description'=>$request->input('description'), 'version'=> $request->input('version')]);
64 64
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
65
-            if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the AutoUpdate Script
65
+            if ($autoUpdateStatus == 1) {
66
+//If License Setting Status is on,Add Product to the AutoUpdate Script
66 67
                 $productSku = $file_upload->product->product_sku;
67 68
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
68 69
                 $addProductToAutoUpdate = $updateClassObj->editVersion($request->input('version'), $productSku);
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductController.php 3 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -183,7 +183,8 @@  discard block
 block discarded – undo
183 183
             $this->product_upload->save();
184 184
             $this->product->where('id', $product_id->id)->update(['version'=>$request->input('version')]);
185 185
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
186
-            if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
186
+            if ($autoUpdateStatus == 1) {
187
+//If License Setting Status is on,Add Product to the License Manager
187 188
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
188 189
                 $addProductToAutoUpdate = $updateClassObj->addNewVersion($product_id->id, $request->input('version'), '1');
189 190
             }
@@ -270,7 +271,8 @@  discard block
 block discarded – undo
270 271
 
271 272
         try {
272 273
             $licenseStatus = StatusSetting::pluck('license_status')->first();
273
-            if ($licenseStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
274
+            if ($licenseStatus == 1) {
275
+//If License Setting Status is on,Add Product to the License Manager
274 276
                 $addProductToLicensing = $this->licensing->addNewProduct($input['name'], $input['product_sku']);
275 277
             }
276 278
             $licenseCont = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -114,18 +114,18 @@  discard block
 block discarded – undo
114 114
 
115 115
             return\ DataTables::of($new_product)
116 116
 
117
-                            ->addColumn('checkbox', function ($model) {
117
+                            ->addColumn('checkbox', function($model) {
118 118
                                 return "<input type='checkbox' class='product_checkbox' 
119 119
                                 value=".$model->id.' name=select[] id=check>';
120 120
                             })
121
-                            ->addColumn('name', function ($model) {
121
+                            ->addColumn('name', function($model) {
122 122
                                 return ucfirst($model->name);
123 123
                             })
124
-                              ->addColumn('image', function ($model) {
124
+                              ->addColumn('image', function($model) {
125 125
                                   // return $model->image;
126 126
                                   return "<img src= '$model->image' + height=\"80\"/>";
127 127
                               })
128
-                            ->addColumn('type', function ($model) {
128
+                            ->addColumn('type', function($model) {
129 129
                                 if ($this->type->where('id', $model->type)->first()) {
130 130
                                     return $this->type->where('id', $model->type)->first()->name;
131 131
                                 } else {
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                                 }
134 134
                             })
135 135
 
136
-                            ->addColumn('group', function ($model) {
136
+                            ->addColumn('group', function($model) {
137 137
                                 if ($this->group->where('id', $model->group)->first()) {
138 138
                                     return $this->group->where('id', $model->group)->first()->name;
139 139
                                 } else {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                                 }
142 142
                             })
143 143
 
144
-                            ->addColumn('Action', function ($model) {
144
+                            ->addColumn('Action', function($model) {
145 145
                                 $permissions = LicensePermissionsController::getPermissionsForProduct($model->id);
146 146
                                 $url = '';
147 147
                                 if ($permissions['downloadPermission'] == 1) {
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                             ->addColumn('name', function ($model) {
126 126
                                 return ucfirst($model->name);
127 127
                             })
128
-                              ->addColumn('image', function ($model) {
129
-                                  // return $model->image;
130
-                                  return "<img src= '$model->image' + height=\"80\"/>";
131
-                              })
128
+                                ->addColumn('image', function ($model) {
129
+                                    // return $model->image;
130
+                                    return "<img src= '$model->image' + height=\"80\"/>";
131
+                                })
132 132
                             ->addColumn('type', function ($model) {
133 133
                                 if ($this->type->where('id', $model->type)->first()) {
134 134
                                     return $this->type->where('id', $model->type)->first()->name;
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
         $this->validate($request, [
175 175
         'producttitle' => 'required',
176 176
         'version'      => 'required',
177
-       // 'filename'     => 'required',
178
-      //  ],
179
-       // ['filename.required' => 'Please Uplaod A file',
177
+        // 'filename'     => 'required',
178
+        //  ],
179
+        // ['filename.required' => 'Please Uplaod A file',
180 180
         ]);
181 181
 
182 182
         try {
Please login to merge, or discard this patch.
app/Http/Controllers/Front/CheckoutController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
                 $ends_at = '';
405 405
             }
406 406
             $this->subscription->create(['user_id' => \Auth::user()->id,
407
-             'plan_id'                             => $planid, 'order_id' => $orderid, 'ends_at' => $ends_at, ]);
407
+                'plan_id'                             => $planid, 'order_id' => $orderid, 'ends_at' => $ends_at, ]);
408 408
         } catch (\Exception $ex) {
409 409
             app('log')->error($ex->getMessage());
410 410
             Bugsnag::notifyException($ex);
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
             $invoiceItem = $this->invoiceItem->create(['invoice_id' => $invoiceid,
456 456
                 'product_name'                                      => $product_name, 'regular_price' => $regular_price,
457 457
                 'quantity'                                          => $quantity, 'tax_name' => $tax_name,
458
-                 'tax_percentage'                                   => $tax_percentage, 'subtotal' => $subtotal, ]);
458
+                    'tax_percentage'                                   => $tax_percentage, 'subtotal' => $subtotal, ]);
459 459
         } catch (\Exception $ex) {
460 460
             app('log')->error($ex->getMessage());
461 461
             Bugsnag::notifyException($ex);
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,8 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function checkoutForm(Request $request)
82 82
     {
83
-        if (!\Auth::user()) {//If User is not Logged in then send him to login Page
83
+        if (!\Auth::user()) {
84
+//If User is not Logged in then send him to login Page
84 85
             $url = $request->segments(); //The requested url (chekout).Save it in Session
85 86
             \Session::put('session-url', $url[0]);
86 87
             $content = Cart::getContent();
@@ -106,7 +107,8 @@  discard block
 block discarded – undo
106 107
 
107 108
         try {
108 109
             $domain = $request->input('domain');
109
-            if ($domain) {//Store the Domain  in session when user Logged In
110
+            if ($domain) {
111
+//Store the Domain  in session when user Logged In
110 112
                 foreach ($domain as $key => $value) {
111 113
                     \Session::put('domain'.$key, $value);
112 114
                 }
@@ -131,7 +133,8 @@  discard block
 block discarded – undo
131 133
     public function getAttributes($content)
132 134
     {
133 135
         try {
134
-            if (count($content) > 0) {//after ProductPurchase this is not true as cart is cleared
136
+            if (count($content) > 0) {
137
+//after ProductPurchase this is not true as cart is cleared
135 138
                 foreach ($content as $key => $item) {
136 139
                     $attributes[] = $item->attributes;
137 140
                     $cart_currency = $attributes[0]['currency']['currency']; //Get the currency of Product in the cart
Please login to merge, or discard this patch.
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') : Plan::where('product', $id)->pluck('id')->first(); //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.