Completed
Push — development ( 877883...280d38 )
by Ashutosh
10:04
created
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.
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.
Indentation   +3 added lines, -3 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);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             if ($product->require_domain == 1) {
107 107
                 $field .= "<div class='col-md-4 form-group'>
108 108
                         <label class='required'>"./* @scrutinizer ignore-type */
109
-                         \Lang::get('message.domain')."</label>
109
+                            \Lang::get('message.domain')."</label>
110 110
                         <input type='text' name='domain' class='form-control' 
111 111
                         id='domain' placeholder='http://example.com'>
112 112
                 </div>";
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                 header('Content-Description: File Transfer');
135 135
                 header('Content-Disposition: attachment; filename = '.$name.'.zip');
136 136
                 header('Content-Length: '.filesize($release));
137
-                 exit;
137
+                    exit;
138 138
                 ob_end_clean();
139 139
                 readfile($release);
140 140
             }
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   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -81,7 +81,8 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function checkoutForm(Request $request)
83 83
     {
84
-        if (!\Auth::user()) {//If User is not Logged in then send him to login Page
84
+        if (!\Auth::user()) {
85
+//If User is not Logged in then send him to login Page
85 86
             $url = $request->segments(); //The requested url (chekout).Save it in Session
86 87
             \Session::put('session-url', $url[0]);
87 88
             $content = Cart::getContent();
@@ -107,7 +108,8 @@  discard block
 block discarded – undo
107 108
 
108 109
         try {
109 110
             $domain = $request->input('domain');
110
-            if ($domain) {//Store the Domain  in session when user Logged In
111
+            if ($domain) {
112
+//Store the Domain  in session when user Logged In
111 113
                 foreach ($domain as $key => $value) {
112 114
                     \Session::put('domain'.$key, $value);
113 115
                 }
@@ -132,7 +134,8 @@  discard block
 block discarded – undo
132 134
     public function getAttributes($content)
133 135
     {
134 136
         try {
135
-            if (count($content) > 0) {//after ProductPurchase this is not true as cart is cleared
137
+            if (count($content) > 0) {
138
+//after ProductPurchase this is not true as cart is cleared
136 139
                 foreach ($content as $key => $item) {
137 140
                     $attributes[] = $item->attributes;
138 141
                     $cart_currency = $attributes[0]['currency']['currency']; //Get the currency of Product in the cart
@@ -174,8 +177,9 @@  discard block
 block discarded – undo
174 177
             // dd($items);
175 178
             if ($invoice) {
176 179
                 $items = $invoice->invoiceItem()->get();
177
-                if (count($items > 0))
178
-                $product = $this->product($invoiceid);
180
+                if (count($items > 0)) {
181
+                                $product = $this->product($invoiceid);
182
+                }
179 183
             }
180 184
 
181 185
             return view('themes.default1.front.paynow', compact('invoice', 'items', 'product'));
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.
app/Http/Controllers/Front/BaseClientController.php 3 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
         $productCheck = $orders->product()
37 37
         ->select('github_owner', 'github_repository', 'type')
38 38
         ->where('id', $orders->product)->first();
39
-        if ($permissions['downloadPermission'] == 1) { //If the Product has doownlaod permission
39
+        if ($permissions['downloadPermission'] == 1) {
40
+//If the Product has doownlaod permission
40 41
             if (!$productCheck->github_owner == '' && !$productCheck->github_repository == '') {
41 42
                 $listUrl = $this->downloadGithubPopup($orders->client, $orders->invoice()->first()->id, $productid);
42 43
             } else {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -200,9 +200,9 @@
 block discarded – undo
200 200
                         ->select('number', 'created_at', 'grand_total', 'id', 'status');
201 201
             }
202 202
             return \DataTables::of($invoices->get())
203
-             ->addColumn('number', function ($model) {
204
-                 return $model->number;
205
-             })
203
+                ->addColumn('number', function ($model) {
204
+                    return $model->number;
205
+                })
206 206
             ->addColumn('products', function ($model) {
207 207
                 $invoice = $this->invoice->find($model->id);
208 208
                 $products = $invoice->invoiceItem()->pluck('product_name')->toArray();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -193,34 +193,34 @@
 block discarded – undo
193 193
             $relation = $order->invoiceRelation()->pluck('invoice_id')->toArray();
194 194
             $invoice = new Invoice();
195 195
             $invoices = $invoice
196
-                    ->select('number', 'created_at', 'grand_total','currency', 'id', 'status')
196
+                    ->select('number', 'created_at', 'grand_total', 'currency', 'id', 'status')
197 197
                     ->whereIn('id', $relation);
198 198
             if ($invoices->get()->count() == 0) {
199 199
                 $invoices = $order->invoice()
200 200
                         ->select('number', 'created_at', 'grand_total', 'id', 'status');
201 201
             }
202 202
             return \DataTables::of($invoices->get())
203
-             ->addColumn('number', function ($model) {
203
+             ->addColumn('number', function($model) {
204 204
                  return $model->number;
205 205
              })
206
-            ->addColumn('products', function ($model) {
206
+            ->addColumn('products', function($model) {
207 207
                 $invoice = $this->invoice->find($model->id);
208 208
                 $products = $invoice->invoiceItem()->pluck('product_name')->toArray();
209 209
 
210 210
                 return ucfirst(implode(',', $products));
211 211
             })
212
-            ->addColumn('date', function ($model) {
212
+            ->addColumn('date', function($model) {
213 213
                 $date = date_create($model->created_at);
214 214
 
215 215
                 return date_format($date, 'M j, Y, g:i a');
216 216
             })
217
-            ->addColumn('total', function ($model) {
218
-                return currency_format($model->grand_total,$code =$model->currency);
217
+            ->addColumn('total', function($model) {
218
+                return currency_format($model->grand_total, $code = $model->currency);
219 219
             })
220
-            ->addColumn('status', function ($model) {
220
+            ->addColumn('status', function($model) {
221 221
                 return ucfirst($model->status);
222 222
             })
223
-            ->addColumn('action', function ($model) {
223
+            ->addColumn('action', function($model) {
224 224
                 if (\Auth::user()->role == 'admin') {
225 225
                     $url = '/invoices/show?invoiceid='.$model->id;
226 226
                 } else {
Please login to merge, or discard this patch.
app/Http/Controllers/Front/ClientController.php 3 patches
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.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
 
146 146
             $order_id = $order->id;
147 147
             $updatesEndDate = Subscription::select('update_ends_at')
148
-                 ->where('product_id', $productid)->where('order_id', $order_id)->first();
148
+                    ->where('product_id', $productid)->where('order_id', $order_id)->first();
149 149
             if ($updatesEndDate) {
150 150
                 foreach ($versions as $version) {
151 151
                     if ($version->created_at->toDateTimeString()
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
                             ->addColumn('payment_method', function ($model) {
418 418
                                 return $model->payment_method;
419 419
                             })
420
-                             ->addColumn('payment_status', function ($model) {
420
+                                ->addColumn('payment_status', function ($model) {
421 421
                                 return $model->payment_status;
422 422
                             })
423 423
                             ->addColumn('created_at', function ($model) {
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
                                 return $date;
429 429
                             })
430 430
                             ->rawColumns(['checkbox', 'number', 'amount',
431
-                             'payment_method', 'payment_status', 'created_at', ])
431
+                                'payment_method', 'payment_status', 'created_at', ])
432 432
                             ->make(true);
433 433
         } catch (Exception $ex) {
434 434
             Bugsnag::notifyException($ex);
@@ -454,17 +454,17 @@  discard block
 block discarded – undo
454 454
                             ->addColumn('number', function ($model) {
455 455
                                 return $model->invoice()->first()->number;
456 456
                             })
457
-                              ->addColumn('total', function ($model) {
458
-                                  return $model->amount;
459
-                              })
460
-                               ->addColumn('created_at', function ($model) {
461
-                                   $date1 = new DateTime($model->created_at);
462
-                                   $tz = \Auth::user()->timezone()->first()->name;
463
-                                   $date1->setTimezone(new DateTimeZone($tz));
464
-                                   $date = $date1->format('M j, Y, g:i a');
465
-
466
-                                   return $date;
467
-                               })
457
+                                ->addColumn('total', function ($model) {
458
+                                    return $model->amount;
459
+                                })
460
+                                ->addColumn('created_at', function ($model) {
461
+                                    $date1 = new DateTime($model->created_at);
462
+                                    $tz = \Auth::user()->timezone()->first()->name;
463
+                                    $date1->setTimezone(new DateTimeZone($tz));
464
+                                    $date = $date1->format('M j, Y, g:i a');
465
+
466
+                                    return $date;
467
+                                })
468 468
 
469 469
                             ->addColumn('payment_method', 'payment_status', 'created_at')
470 470
 
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -79,19 +79,19 @@  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
 
92
-                                return  currency_format($model->grand_total,$code =\Auth::user()->currency);
92
+                                return  currency_format($model->grand_total, $code = \Auth::user()->currency);
93 93
                             })
94
-                            ->addColumn('Action', function ($model) {
94
+                            ->addColumn('Action', function($model) {
95 95
                                 $status = $model->status;
96 96
                                 $payment = '';
97 97
                                 if ($status == 'Pending' && $model->grand_total > 0) {
@@ -156,19 +156,19 @@  discard block
 block discarded – undo
156 156
             }
157 157
 
158 158
             return \DataTables::of($versions)
159
-                            ->addColumn('id', function ($versions) {
159
+                            ->addColumn('id', function($versions) {
160 160
                                 return ucfirst($versions->id);
161 161
                             })
162
-                            ->addColumn('version', function ($versions) {
162
+                            ->addColumn('version', function($versions) {
163 163
                                 return ucfirst($versions->version);
164 164
                             })
165
-                            ->addColumn('title', function ($versions) {
165
+                            ->addColumn('title', function($versions) {
166 166
                                 return ucfirst($versions->title);
167 167
                             })
168
-                            ->addColumn('description', function ($versions) {
168
+                            ->addColumn('description', function($versions) {
169 169
                                 return ucfirst($versions->description);
170 170
                             })
171
-                            ->addColumn('file', function ($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
171
+                            ->addColumn('file', function($versions) use ($countExpiry, $countVersions, $clientid, $invoiceid, $productid) {
172 172
                                 $invoice_id = Invoice::where('number', $invoiceid)->pluck('id')->first();
173 173
                                 $order = Order::where('invoice_id', '=', $invoice_id)->first();
174 174
                                 $order_id = $order->id;
@@ -234,18 +234,18 @@  discard block
 block discarded – undo
234 234
             }
235 235
 
236 236
             return \DataTables::of($link)
237
-                            ->addColumn('version', function ($link) {
237
+                            ->addColumn('version', function($link) {
238 238
                                 return ucfirst($link['tag_name']);
239 239
                             })
240
-                            ->addColumn('name', function ($link) {
240
+                            ->addColumn('name', function($link) {
241 241
                                 return ucfirst($link['name']);
242 242
                             })
243
-                            ->addColumn('description', function ($link) {
243
+                            ->addColumn('description', function($link) {
244 244
                                 $markdown = Markdown::convertToHtml(ucfirst($link['body']));
245 245
 
246 246
                                 return $markdown;
247 247
                             })
248
-                            ->addColumn('file', function ($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
248
+                            ->addColumn('file', function($link) use ($countExpiry, $countVersions, $invoiceid, $productid) {
249 249
                                 $order = Order::where('invoice_id', '=', $invoiceid)->first();
250 250
                                 $order_id = $order->id;
251 251
                                 $orderEndDate = Subscription::select('update_ends_at')
@@ -281,20 +281,20 @@  discard block
 block discarded – undo
281 281
             $orders = Order::where('client', \Auth::user()->id);
282 282
 
283 283
             return \DataTables::of($orders->get())
284
-                            ->addColumn('id', function ($model) {
284
+                            ->addColumn('id', function($model) {
285 285
                                 return $model->id;
286 286
                             })
287
-                            ->addColumn('product_name', function ($model) {
287
+                            ->addColumn('product_name', function($model) {
288 288
                                 return $model->product()->first()->name;
289 289
                             })
290
-                            ->addColumn('expiry', function ($model) {
290
+                            ->addColumn('expiry', function($model) {
291 291
                                 $tz = \Auth::user()->timezone()->first()->name;
292 292
                                 $end = $this->getExpiryDate($model);
293 293
 
294 294
                                 return $end;
295 295
                             })
296 296
 
297
-                            ->addColumn('Action', function ($model) {
297
+                            ->addColumn('Action', function($model) {
298 298
                                 $sub = $model->subscription()->first();
299 299
                                 $order = Order::where('id', $model->id)->select('product')->first();
300 300
                                 $productid = $order->product;
@@ -400,27 +400,27 @@  discard block
 block discarded – undo
400 400
                     ->select('id', 'invoice_id', 'user_id', 'amount', 'payment_method', 'payment_status', 'created_at');
401 401
 
402 402
             return \DataTables::of($payments->get())
403
-                            ->addColumn('checkbox', function ($model) {
403
+                            ->addColumn('checkbox', function($model) {
404 404
                                 if (\Input::get('client') != 'true') {
405 405
                                     return "<input type='checkbox' class='payment_checkbox' 
406 406
                                     value=".$model->id.' name=select[] id=check>';
407 407
                                 }
408 408
                             })
409
-                            ->addColumn('number', function ($model) {
409
+                            ->addColumn('number', function($model) {
410 410
                                 return $model->invoice()->first()->number;
411 411
                             })
412
-                            ->addColumn('amount', function ($model) {
412
+                            ->addColumn('amount', function($model) {
413 413
                                 $currency = $model->invoice()->first()->currency;
414
-                                $total = currency_format($model->amount,$code =$currency);
414
+                                $total = currency_format($model->amount, $code = $currency);
415 415
                                 return $total;
416 416
                             })
417
-                            ->addColumn('payment_method', function ($model) {
417
+                            ->addColumn('payment_method', function($model) {
418 418
                                 return $model->payment_method;
419 419
                             })
420
-                             ->addColumn('payment_status', function ($model) {
420
+                             ->addColumn('payment_status', function($model) {
421 421
                                 return $model->payment_status;
422 422
                             })
423
-                            ->addColumn('created_at', function ($model) {
423
+                            ->addColumn('created_at', function($model) {
424 424
                                 $date1 = new DateTime($model->created_at);
425 425
                                 $tz = \Auth::user()->timezone()->first()->name;
426 426
                                 $date1->setTimezone(new DateTimeZone($tz));
@@ -451,13 +451,13 @@  discard block
 block discarded – undo
451 451
                     ->select('id', 'invoice_id', 'user_id', 'payment_method', 'payment_status', 'created_at', 'amount');
452 452
             //dd(\Input::all());
453 453
             return \DataTables::of($payments->get())
454
-                            ->addColumn('number', function ($model) {
454
+                            ->addColumn('number', function($model) {
455 455
                                 return $model->invoice()->first()->number;
456 456
                             })
457
-                              ->addColumn('total', function ($model) {
457
+                              ->addColumn('total', function($model) {
458 458
                                   return $model->amount;
459 459
                               })
460
-                               ->addColumn('created_at', function ($model) {
460
+                               ->addColumn('created_at', function($model) {
461 461
                                    $date1 = new DateTime($model->created_at);
462 462
                                    $tz = \Auth::user()->timezone()->first()->name;
463 463
                                    $date1->setTimezone(new DateTimeZone($tz));
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.
app/Http/Middleware/Admin.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,8 @@
 block discarded – undo
47 47
             if ($url) {
48 48
                 $content = \Cart::getContent();
49 49
                 $currency = (\Session::get('currency'));
50
-                if (\Auth::user()->currency != $currency['currency']) {//If user currency is not equal to the cart currency then redirect to default url and clear his cart items and let the customer add the Product again so that the tax could be calculated properly
50
+                if (\Auth::user()->currency != $currency['currency']) {
51
+//If user currency is not equal to the cart currency then redirect to default url and clear his cart items and let the customer add the Product again so that the tax could be calculated properly
51 52
                     foreach ($content as $key => $item) {
52 53
                         $id = $item->id;
53 54
                         Cart::remove($id);
Please login to merge, or discard this patch.