Completed
Pull Request — development (#750)
by Ashutosh
19:06 queued 09:09
created
app/Http/Controllers/Front/CheckoutController.php 1 patch
Braces   +10 added lines, -5 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
@@ -266,9 +269,11 @@  discard block
 block discarded – undo
266 269
                     \Event::fire(new \App\Events\PaymentGateway(['request' => $request, 'cart' => Cart::getContent(), 'order' => $invoice]));
267 270
                 }
268 271
             } else {
269
-                if ($paynow == false) {//Regular Payment for free Product
272
+                if ($paynow == false) {
273
+//Regular Payment for free Product
270 274
                     $action = $this->checkoutAction($invoice);
271
-                } else {//Renewal Payment for free Product
275
+                } else {
276
+//Renewal Payment for free Product
272 277
                     $control = new \App\Http\Controllers\Order\RenewController();
273 278
                     $control->successRenew($invoice);
274 279
                     $payment = new \App\Http\Controllers\Order\InvoiceController();
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) {//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) {
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.
app/Http/Controllers/Product/ExtendedBaseProductController.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
             if ($product->require_domain == 1) {
120 120
                 $field .= "<div class='col-md-4 form-group'>
121 121
                         <label class='required'>"./* @scrutinizer ignore-type */
122
-                         \Lang::get('message.domain')."</label>
122
+                            \Lang::get('message.domain')."</label>
123 123
                         <input type='text' name='domain' class='form-control' 
124 124
                         id='domain' placeholder='http://example.com'>
125 125
                 </div>";
Please login to merge, or discard this patch.
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 '<p><a href='.url('edit-upload/'.$model->id).
45 45
                                 " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
46 46
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>&nbsp</p>";
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,8 @@
 block discarded – undo
76 76
             $file_upload = ProductUpload::find($id);
77 77
             $file_upload->where('id', $id)->update(['title'=>$request->input('title'), 'description'=>$request->input('description'), 'version'=> $request->input('version')]);
78 78
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
79
-            if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the AutoUpdate Script
79
+            if ($autoUpdateStatus == 1) {
80
+//If License Setting Status is on,Add Product to the AutoUpdate Script
80 81
                 $productSku = $file_upload->product->product_sku;
81 82
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
82 83
                 $addProductToAutoUpdate = $updateClassObj->editVersion($request->input('version'), $productSku);
Please login to merge, or discard this patch.
app/Http/Kernel.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
         \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
18 18
         \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
19 19
         // \App\Http\Middleware\TrimStrings::class,
20
-          \Illuminate\Session\Middleware\StartSession::class,
21
-             \Illuminate\View\Middleware\ShareErrorsFromSession::class,
22
-              \Voerro\Laravel\VisitorTracker\Middleware\RecordVisits::class,
23
-              // \Torann\Currency\Middleware\CurrencyMiddleware::class,
20
+            \Illuminate\Session\Middleware\StartSession::class,
21
+                \Illuminate\View\Middleware\ShareErrorsFromSession::class,
22
+                \Voerro\Laravel\VisitorTracker\Middleware\RecordVisits::class,
23
+                // \Torann\Currency\Middleware\CurrencyMiddleware::class,
24 24
         // \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
25 25
     ];
26 26
 
@@ -31,21 +31,21 @@  discard block
 block discarded – undo
31 31
      */
32 32
     protected $middlewareGroups = [
33 33
         'web' => [
34
-             \App\Http\Middleware\Install::class,
34
+                \App\Http\Middleware\Install::class,
35 35
             \App\Http\Middleware\EncryptCookies::class,
36 36
             \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
37 37
             // \Illuminate\Session\Middleware\StartSession::class,
38 38
             // \Illuminate\Session\Middleware\AuthenticateSession::class,
39 39
             // \Illuminate\View\Middleware\ShareErrorsFromSession::class,
40
-           // \App\Http\Middleware\VerifyCsrfToken::class,
40
+            // \App\Http\Middleware\VerifyCsrfToken::class,
41 41
             \Illuminate\Routing\Middleware\SubstituteBindings::class,
42 42
             \Barryvdh\Cors\HandleCors::class,
43
-             // \App\Http\Middleware\IsInstalled::class,
43
+                // \App\Http\Middleware\IsInstalled::class,
44 44
 
45 45
         ],
46
-         'admin'        => [\App\Http\Middleware\Admin::class],
47
-          'guest'       => [\App\Http\Middleware\RedirectIfAuthenticated::class],
48
-           'auth'       => [\Illuminate\Auth\Middleware\Authenticate::class],
46
+            'admin'        => [\App\Http\Middleware\Admin::class],
47
+            'guest'       => [\App\Http\Middleware\RedirectIfAuthenticated::class],
48
+            'auth'       => [\Illuminate\Auth\Middleware\Authenticate::class],
49 49
         'auth.basic'    => [\Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class],
50 50
 
51 51
         'api' => [
Please login to merge, or discard this patch.