Test Setup Failed
Push — development ( a09b9d...89aabe )
by Ashutosh
10:11
created
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 3 patches
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.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         }
160 160
         if(strtotime($updatesExpiry) >1) {
161 161
             $u_expiry = date('Y-m-d', strtotime($updatesExpiry));
162
-       }
162
+        }
163 163
         if(strtotime($supportExpiry) >1) {
164 164
             $s_expiry = date('Y-m-d', strtotime($supportExpiry));
165 165
         }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $productId = $searchLicense['productId'];
181 181
         $licenseCode = $searchLicense['code'];
182 182
         $updateLicense = $this->postCurl($url, "api_key_secret=$api_key_secret&api_function=licenses_edit&product_id=$productId&license_code=$licenseCode&license_id=$licenseId&license_order_number=$orderNo&license_require_domain=$requiredomain&license_status=1&license_expire_date=$l_expiry&license_updates_date=$u_expiry&license_support_date=$s_expiry&license_domain=$domain&license_ip=$ip");
183
-   }
183
+    }
184 184
 
185 185
     public function searchLicenseId($licenseCode, $productId)
186 186
     {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -149,28 +149,28 @@  discard block
 block discarded – undo
149 149
     /*
150 150
     *  Edit Existing License
151 151
     */
152
-    public function updateLicensedDomain($licenseCode, $domain, $productId, $licenseExpiry,$updatesExpiry,$supportExpiry, $orderNo)
152
+    public function updateLicensedDomain($licenseCode, $domain, $productId, $licenseExpiry, $updatesExpiry, $supportExpiry, $orderNo)
153 153
     {
154 154
         $l_expiry = '';
155 155
         $s_expiry = '';
156 156
         $u_expiry = '';
157
-        if (strtotime($licenseExpiry) >1) {
157
+        if (strtotime($licenseExpiry) > 1) {
158 158
             $l_expiry = date('Y-m-d', strtotime($licenseExpiry));
159 159
         }
160
-        if(strtotime($updatesExpiry) >1) {
160
+        if (strtotime($updatesExpiry) > 1) {
161 161
             $u_expiry = date('Y-m-d', strtotime($updatesExpiry));
162 162
        }
163
-        if(strtotime($supportExpiry) >1) {
163
+        if (strtotime($supportExpiry) > 1) {
164 164
             $s_expiry = date('Y-m-d', strtotime($supportExpiry));
165 165
         }
166 166
         $url = $this->url;
167 167
         $isIP = (bool) ip2long($domain);
168 168
         if ($isIP == true) {
169
-            $requiredomain= 0;
169
+            $requiredomain = 0;
170 170
             $ip = $domain;
171 171
             $domain = '';
172 172
         } else {
173
-            $requiredomain= 1;
173
+            $requiredomain = 1;
174 174
             $domain = $domain;
175 175
             $ip = '';
176 176
         }
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
         $url = $this->url;
244 244
         $isIP = (bool) ip2long($domain);
245 245
         if ($isIP == true) {
246
-            $requiredomain= 0;
246
+            $requiredomain = 0;
247 247
             $ip = $domain;
248 248
             $domain = '';
249 249
         } else {
250
-            $requiredomain= 1;
250
+            $requiredomain = 1;
251 251
             $domain = $domain;
252 252
             $ip = '';
253 253
         }
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.
app/Model/Product/Subscription.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     'user_id', 'plan_id', 'order_id', 'deny_after_subscription', 'version', 'product_id', 'support_ends_at', ];
16 16
     protected $dates = ['ends_at'];
17 17
     protected static $logName = 'Subscription';
18
-    protected static $logAttributes = ['ends_at', 'update_ends_at', 'support_ends_at', 'user_id', 'plan_id', 'order_id',  'version', 'product_id'];
18
+    protected static $logAttributes = ['ends_at', 'update_ends_at', 'support_ends_at', 'user_id', 'plan_id', 'order_id', 'version', 'product_id'];
19 19
     protected static $logOnlyDirty = true;
20 20
 
21 21
     public function getDescriptionForEvent(string $eventName): string
Please login to merge, or discard this patch.
app/Traits/TaxCalculation.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $value = '';
171 171
         $value = $taxes->toArray()[0]['active'] ?
172 172
              (TaxProductRelation::where('product_id', $productid)
173
-              ->where('tax_class_id', $taxClassId)->count() ? $ut_gst + $c_gst.'%' : 0) : 0;
173
+                ->where('tax_class_id', $taxClassId)->count() ? $ut_gst + $c_gst.'%' : 0) : 0;
174 174
 
175 175
         return $value;
176 176
     }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         $otherRate = 0;
188 188
         $status = $taxes->toArray()[0]['active'];
189 189
         if ($status && (TaxProductRelation::where('product_id', $productid)
190
-          ->where('tax_class_id', $taxClassId)->count() > 0)) {
190
+            ->where('tax_class_id', $taxClassId)->count() > 0)) {
191 191
             $otherRate = Tax::where('tax_classes_id', $taxClassId)->first()->rate;
192 192
         }
193 193
         $value = $otherRate.'%';
Please login to merge, or discard this patch.
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,24 +18,28 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function getDetailsWhenUserStateIsIndian($user_state, $origin_state, $productid, $geoip_state, $geoip_country, $status = 1)
20 20
     {
21
-        if ($user_state != '') {//Get the CGST,SGST,IGST,STATE_CODE of the user,if user from INdia
21
+        if ($user_state != '') {
22
+//Get the CGST,SGST,IGST,STATE_CODE of the user,if user from INdia
22 23
             $c_gst = $user_state->c_gst;
23 24
             $s_gst = $user_state->s_gst;
24 25
             $i_gst = $user_state->i_gst;
25 26
             $ut_gst = $user_state->ut_gst;
26 27
             $state_code = $user_state->state_code;
27 28
 
28
-            if ($state_code == $origin_state) {//If user and origin state are same
29
+            if ($state_code == $origin_state) {
30
+//If user and origin state are same
29 31
                 $rateForSameState = $this->getTaxWhenIndianSameState($user_state, $origin_state, $productid, $c_gst, $s_gst, $state_code, $status);
30 32
                 $taxes = $rateForSameState['taxes'];
31 33
                 $status = $rateForSameState['status'];
32 34
                 $value = $rateForSameState['value'];
33
-            } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {//If user is from other state
35
+            } elseif ($state_code != $origin_state && $ut_gst == 'NULL') {
36
+//If user is from other state
34 37
                 $rateForOtherState = $this->getTaxWhenIndianOtherState($user_state, $origin_state, $productid, $i_gst, $state_code, $status);
35 38
                 $taxes = $rateForOtherState['taxes'];
36 39
                 $status = $rateForOtherState['status'];
37 40
                 $value = $rateForOtherState['value'];
38
-            } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {//if user from Union Territory
41
+            } elseif ($state_code != $origin_state && $ut_gst != 'NULL') {
42
+//if user from Union Territory
39 43
                 $rateForUnionTerritory = $this->getTaxWhenUnionTerritory($user_state, $origin_state, $productid, $c_gst, $ut_gst, $state_code, $status);
40 44
                 $taxes = $rateForUnionTerritory['taxes'];
41 45
                 $status = $rateForUnionTerritory['status'];
@@ -56,13 +60,15 @@  discard block
 block discarded – undo
56 60
         $taxClassId = Tax::where('state', $geoip_state)
57 61
                 ->orWhere('country', $geoip_country)
58 62
                 ->pluck('tax_classes_id')->first();
59
-        if ($taxClassId) { //if state equals the user State or country equals user country
63
+        if ($taxClassId) {
64
+//if state equals the user State or country equals user country
60 65
             $taxForSpecificCountry = $this->getTaxForSpecificCountry($taxClassId, $productid, $status);
61 66
             $taxes = $taxForSpecificCountry['taxes'];
62 67
             $status = $taxForSpecificCountry['status'];
63 68
             $value = $taxForSpecificCountry['value'];
64 69
             $rate = $taxForSpecificCountry['value'];
65
-        } else {//if Tax is selected for Any Country Any State
70
+        } else {
71
+//if Tax is selected for Any Country Any State
66 72
             $taxClassId = Tax::where('country', '')
67 73
                     ->where('state', 'Any State')
68 74
                     ->pluck('tax_classes_id')->first();
@@ -96,13 +102,15 @@  discard block
 block discarded – undo
96 102
                 $status = 0;
97 103
             }
98 104
             $rate = $value;
99
-        } else {//In case of other country
105
+        } else {
106
+//In case of other country
100 107
             //when tax is available and tax is not enabled
101 108
             //(Applicable when Global Tax class for any country and state is not there)
102 109
             $taxClassId = Tax::where('state', $geoip_state)
103 110
             ->orWhere('country', $geoip_country)
104 111
             ->pluck('tax_classes_id')->first();
105
-            if ($taxClassId) { //if state equals the user State
112
+            if ($taxClassId) {
113
+//if state equals the user State
106 114
                 $taxes = $this->getTaxByPriority($taxClassId);
107 115
                 $value = $this->getValueForOthers($productid, $taxClassId, $taxes);
108 116
                 if ($value == '') {
Please login to merge, or discard this patch.
app/Traits/PaymentsAndInvoices.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,10 +90,12 @@  discard block
 block discarded – undo
90 90
 
91 91
         public function getAgents($agents, $productid, $plan)
92 92
         {
93
-            if (!$agents) {//If agents is not received in the request in the case when
93
+            if (!$agents) {
94
+//If agents is not received in the request in the case when
94 95
                 // 'modify agent' is not allowed for the Product,get the no of Agents from the Plan Table.
95 96
                 $planForAgent = Product::find($productid)->planRelation->find($plan);
96
-                if ($planForAgent) {//If Plan Exists For the Product ie not a Product without Plan
97
+                if ($planForAgent) {
98
+//If Plan Exists For the Product ie not a Product without Plan
97 99
                     $noOfAgents = $planForAgent->planPrice->first()->no_of_agents;
98 100
                     $agents = $noOfAgents ? $noOfAgents : 0; //If no. of Agents is specified then that,else 0(Unlimited Agents)
99 101
                 } else {
@@ -106,7 +108,8 @@  discard block
 block discarded – undo
106 108
 
107 109
         public function getQuantity($qty, $productid, $plan)
108 110
         {
109
-            if (!$qty) {//If quantity is not received in the request in the case when 'modify quantity' is not allowed for the Product,get the Product qUANTITY from the Plan Table.
111
+            if (!$qty) {
112
+//If quantity is not received in the request in the case when 'modify quantity' is not allowed for the Product,get the Product qUANTITY from the Plan Table.
110 113
                 $planForQty = Product::find($productid)->planRelation->find($plan);
111 114
                 if ($planForQty) {
112 115
                     $quantity = Product::find($productid)->planRelation->find($plan)->planPrice->first()->product_quantity;
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
                 $paymentid = $request->input('id');
29 29
                 $creditAmtUserId = $this->payment->where('id', $paymentid)->value('user_id');
30 30
                 $creditAmt = $this->payment->where('user_id', $creditAmtUserId)
31
-                  ->where('invoice_id', '=', 0)->value('amt_to_credit');
31
+                    ->where('invoice_id', '=', 0)->value('amt_to_credit');
32 32
                 $invoices = $invoice->where('user_id', $creditAmtUserId)->orderBy('created_at', 'desc')->get();
33 33
                 $cltCont = new \App\Http\Controllers\User\ClientController();
34 34
                 $invoiceSum = $cltCont->getTotalInvoice($invoices);
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $payment_method,
62 62
         $invoiceid,
63 63
         $amount,
64
-       $parent_id = '',
64
+        $parent_id = '',
65 65
         $userid = '',
66 66
         $payment_status = 'pending'
67 67
     ) {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                 $paymentRenewal = $this->updateInvoicePayment(
160 160
                 $invoiceid,
161 161
                 $payment_method,
162
-             $payment_status,
162
+                $payment_status,
163 163
                 $payment_date,
164 164
                 $amount
165 165
             );
@@ -217,15 +217,15 @@  discard block
 block discarded – undo
217 217
 
218 218
                     return view(
219 219
                     'themes.default1.invoice.payment',
220
-                 compact(
221
-                     'invoice_status',
222
-                     'payment_status',
223
-                  'payment_method',
224
-                     'invoice_id',
225
-                     'domain',
226
-                     'invoice',
227
-                     'userid'
228
-                 )
220
+                    compact(
221
+                        'invoice_status',
222
+                        'payment_status',
223
+                    'payment_method',
224
+                        'invoice_id',
225
+                        'domain',
226
+                        'invoice',
227
+                        'userid'
228
+                    )
229 229
                 );
230 230
                 }
231 231
 
Please login to merge, or discard this patch.
app/Traits/Order/UpdateDates.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function editUpdateExpiry(Request $request)
23 23
     {
24 24
         $this->validate($request, [
25
-         'date' => 'required',
25
+            'date' => 'required',
26 26
         ]);
27 27
 
28 28
         try {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function editLicenseExpiry(Request $request)
68 68
     {
69 69
         $this->validate($request, [
70
-         'date' => 'required',
70
+            'date' => 'required',
71 71
         ]);
72 72
 
73 73
         try {
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     public function editSupportExpiry(Request $request)
113 113
     {
114 114
         $this->validate($request, [
115
-         'date' => 'required',
115
+            'date' => 'required',
116 116
         ]);
117 117
 
118 118
         try {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
     public function editUpdateDateInAPL($orderId, $expiryDate, $licenseSupportExpiry)
55 55
     {
56 56
         $order = Order::find($orderId);
57
-        $licenseExpiry = strtotime($licenseSupportExpiry->ends_at)>1 ? date('Y-m-d', strtotime($licenseSupportExpiry->ends_at)) : '';
58
-        $supportExpiry = strtotime($licenseSupportExpiry->support_ends_at) >1 ? date('Y-m-d', strtotime($licenseSupportExpiry->support_ends_at)) : '';
57
+        $licenseExpiry = strtotime($licenseSupportExpiry->ends_at) > 1 ? date('Y-m-d', strtotime($licenseSupportExpiry->ends_at)) : '';
58
+        $supportExpiry = strtotime($licenseSupportExpiry->support_ends_at) > 1 ? date('Y-m-d', strtotime($licenseSupportExpiry->support_ends_at)) : '';
59 59
         $expiryDate = strtotime($expiryDate) > 1 ? date('Y-m-d', strtotime($expiryDate)) : '';
60 60
         $cont = new \App\Http\Controllers\License\LicenseController();
61 61
         $updateLicensedDomain = $cont->updateExpirationDate($order->serial_key, $expiryDate, $order->product, $order->domain, $order->number, $licenseExpiry, $supportExpiry);
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
     public function editLicenseDateInAPL($orderId, $date, $updatesSupportExpiry)
100 100
     {
101 101
         $order = Order::find($orderId);
102
-        $expiryDate = strtotime($updatesSupportExpiry->update_ends_at)>1 ? date('Y-m-d', strtotime($updatesSupportExpiry->update_ends_at)) : '';
103
-        $supportExpiry = strtotime($updatesSupportExpiry->support_ends_at)>1 ? date('Y-m-d', strtotime($updatesSupportExpiry->support_ends_at)) : '';
104
-        $licenseExpiry = strtotime($date)>1 ? date('Y-m-d', strtotime($date)) : '';
102
+        $expiryDate = strtotime($updatesSupportExpiry->update_ends_at) > 1 ? date('Y-m-d', strtotime($updatesSupportExpiry->update_ends_at)) : '';
103
+        $supportExpiry = strtotime($updatesSupportExpiry->support_ends_at) > 1 ? date('Y-m-d', strtotime($updatesSupportExpiry->support_ends_at)) : '';
104
+        $licenseExpiry = strtotime($date) > 1 ? date('Y-m-d', strtotime($date)) : '';
105 105
         $cont = new \App\Http\Controllers\License\LicenseController();
106 106
         $updateLicensedDomain = $cont->updateExpirationDate($order->serial_key, $expiryDate, $order->product, $order->domain, $order->number, $licenseExpiry, $supportExpiry);
107 107
     }
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
     public function editSupportDateInAPL($orderId, $date, $updatesLicenseExpiry)
145 145
     {
146 146
         $order = Order::find($orderId);
147
-        $expiryDate = strtotime($updatesLicenseExpiry->update_ends_at)>1 ? date('Y-m-d', strtotime($updatesLicenseExpiry->update_ends_at)) : '';
148
-        $licenseExpiry = strtotime($updatesLicenseExpiry->ends_at)>1 ? date('Y-m-d', strtotime($updatesLicenseExpiry->ends_at)) : '';
149
-        $supportExpiry = strtotime($date)>1 ? date('Y-m-d', strtotime($date)) : '';
147
+        $expiryDate = strtotime($updatesLicenseExpiry->update_ends_at) > 1 ? date('Y-m-d', strtotime($updatesLicenseExpiry->update_ends_at)) : '';
148
+        $licenseExpiry = strtotime($updatesLicenseExpiry->ends_at) > 1 ? date('Y-m-d', strtotime($updatesLicenseExpiry->ends_at)) : '';
149
+        $supportExpiry = strtotime($date) > 1 ? date('Y-m-d', strtotime($date)) : '';
150 150
         $cont = new \App\Http\Controllers\License\LicenseController();
151 151
         $updateLicensedDomain = $cont->updateExpirationDate($order->serial_key, $expiryDate, $order->product, $order->domain, $order->number, $licenseExpiry, $supportExpiry);
152 152
     }
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $status = $request->input('status');
61 61
 
62 62
         return view('themes.default1.common.dashboard', compact('allowedCurrencies1','allowedCurrencies2','currency1Symbol','currency2Symbol','totalSalesCurrency2', 'totalSalesCurrency1', 'yearlySalesCurrency2', 'yearlySalesCurrency1', 'monthlySalesCurrency2', 'monthlySalesCurrency1', 'users','count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices', 'products', 'arrayCountList', 'pendingPaymentCurrency2', 'pendingPaymentCurrency1', 'status','startSubscriptionDate',
63
-                 'endSubscriptionDate'));
63
+                    'endSubscriptionDate'));
64 64
     }
65 65
 
66 66
     /**
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         // dd($currentYear,$currentMonth );
158 158
         $total = Invoice::whereYear('created_at', '=', $currentYear)->whereMonth('created_at', '=', $currentMonth)
159 159
                 ->where('currency', $allowedCurrencies1)
160
-                 ->where('status', '=', 'success')
160
+                    ->where('status', '=', 'success')
161 161
                 ->pluck('grand_total')->all();
162 162
         $grandTotal = array_sum($total);
163 163
 
@@ -204,9 +204,9 @@  discard block
 block discarded – undo
204 204
     public function getAllUsers()
205 205
     {
206 206
         $allUsers = User::orderBy('created_at', 'desc')->where('active', 1)->where('mobile_verified', 1)
207
-              ->take(20)
208
-              ->get()
209
-              ->toArray();
207
+                ->take(20)
208
+                ->get()
209
+                ->toArray();
210 210
 
211 211
         return $allUsers;
212 212
     }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $dayUtc = new Carbon('-30 days');
242 242
         $minus30Day = $dayUtc->toDateTimeString();
243 243
         $recentOrders = Order::where('created_at', '>', $minus30Day)->orderBy('created_at', 'desc')
244
-                 ->where('price_override', '>', 0)->get();
244
+                    ->where('price_override', '>', 0)->get();
245 245
 
246 246
         return $recentOrders;
247 247
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $endSubscriptionDate = date('Y-m-d', strtotime('+3 months'));
60 60
         $status = $request->input('status');
61 61
 
62
-        return view('themes.default1.common.dashboard', compact('allowedCurrencies1','allowedCurrencies2','currency1Symbol','currency2Symbol','totalSalesCurrency2', 'totalSalesCurrency1', 'yearlySalesCurrency2', 'yearlySalesCurrency1', 'monthlySalesCurrency2', 'monthlySalesCurrency1', 'users','count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices', 'products', 'arrayCountList', 'pendingPaymentCurrency2', 'pendingPaymentCurrency1', 'status','startSubscriptionDate',
62
+        return view('themes.default1.common.dashboard', compact('allowedCurrencies1', 'allowedCurrencies2', 'currency1Symbol', 'currency2Symbol', 'totalSalesCurrency2', 'totalSalesCurrency1', 'yearlySalesCurrency2', 'yearlySalesCurrency1', 'monthlySalesCurrency2', 'monthlySalesCurrency1', 'users', 'count_users', 'arraylists', 'productSoldlists', 'orders', 'subscriptions', 'invoices', 'products', 'arrayCountList', 'pendingPaymentCurrency2', 'pendingPaymentCurrency1', 'status', 'startSubscriptionDate',
63 63
                  'endSubscriptionDate'));
64 64
     }
65 65
 
Please login to merge, or discard this patch.