Completed
Pull Request — development (#724)
by Ashutosh
18:55 queued 09:17
created
app/Http/Controllers/BaseHomeController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
     public function checkUpdatesExpiry(Request $request)
147 147
     {
148 148
         $v = \Validator::make($request->all(), [
149
-          'order_number' => 'required',
149
+            'order_number' => 'required',
150 150
         ]);
151 151
         if ($v->fails()) {
152 152
             $error = $v->errors();
Please login to merge, or discard this patch.
app/Http/Controllers/HomeController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             $serial_key = $this->checkSerialKey($faveo_encrypted_key, $order_number);
96 96
 
97 97
             \Log::emergency(json_encode(['domain' => $request->input('domain'),
98
-             'serial'                             => $serial_key, 'order' => $order_number, ]));
98
+                'serial'                             => $serial_key, 'order' => $order_number, ]));
99 99
             $result = [];
100 100
             if ($request_type == 'install') {
101 101
                 $result = $this->verificationResult($order_number, $serial_key);
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                     ->value('serial_key');
350 350
 
351 351
             $this_order = $order
352
-                     ->where('number', $faveo_encrypted_order_number)
352
+                        ->where('number', $faveo_encrypted_order_number)
353 353
                     ->first();
354 354
             if ($this_order && $orderSerialKey == $faveo_serial_key) {
355 355
                 $product_id = $this_order->product;
Please login to merge, or discard this patch.
app/Http/Kernel.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@  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
-              // \Torann\Currency\Middleware\CurrencyMiddleware::class,
20
+            \Illuminate\Session\Middleware\StartSession::class,
21
+                \Illuminate\View\Middleware\ShareErrorsFromSession::class,
22
+                // \Torann\Currency\Middleware\CurrencyMiddleware::class,
23 23
         // \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
24 24
     ];
25 25
 
@@ -30,21 +30,21 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected $middlewareGroups = [
32 32
         'web' => [
33
-             \App\Http\Middleware\Install::class,
33
+                \App\Http\Middleware\Install::class,
34 34
             \App\Http\Middleware\EncryptCookies::class,
35 35
             \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
36 36
             // \Illuminate\Session\Middleware\StartSession::class,
37 37
             // \Illuminate\Session\Middleware\AuthenticateSession::class,
38 38
             // \Illuminate\View\Middleware\ShareErrorsFromSession::class,
39
-           // \App\Http\Middleware\VerifyCsrfToken::class,
39
+            // \App\Http\Middleware\VerifyCsrfToken::class,
40 40
             \Illuminate\Routing\Middleware\SubstituteBindings::class,
41 41
             \Barryvdh\Cors\HandleCors::class,
42
-             // \App\Http\Middleware\IsInstalled::class,
42
+                // \App\Http\Middleware\IsInstalled::class,
43 43
 
44 44
         ],
45
-         'admin'        => [\App\Http\Middleware\Admin::class],
46
-          'guest'       => [\App\Http\Middleware\RedirectIfAuthenticated::class],
47
-           'auth'       => [\Illuminate\Auth\Middleware\Authenticate::class],
45
+            'admin'        => [\App\Http\Middleware\Admin::class],
46
+            'guest'       => [\App\Http\Middleware\RedirectIfAuthenticated::class],
47
+            'auth'       => [\Illuminate\Auth\Middleware\Authenticate::class],
48 48
         'auth.basic'    => [\Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class],
49 49
 
50 50
         'api' => [
Please login to merge, or discard this patch.
app/Http/Requests/User/ProfileRequest.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@
 block discarded – undo
45 45
             $userid = \Auth::user()->id;
46 46
 
47 47
             return [
48
-                     'first_name'            => 'required|min:3|max:30',
48
+                        'first_name'            => 'required|min:3|max:30',
49 49
                     'last_name'              => 'required|max:30',
50
-                     'mobile'                => 'required|regex:/[0-9]/|min:5|max:20',
51
-                     'email'                 => 'required',
50
+                        'mobile'                => 'required|regex:/[0-9]/|min:5|max:20',
51
+                        'email'                 => 'required',
52 52
                     'mobile_code'            => 'required|numeric',
53 53
                     'mobile'                 => 'required|numeric',
54 54
                     'zip'                    => 'required|numeric',
Please login to merge, or discard this patch.
app/Http/Controllers/Product/BaseProductController.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -126,7 +126,8 @@  discard block
 block discarded – undo
126 126
 
127 127
             $plan = new Plan();
128 128
             $plans = $plan->where('product', $productid)->pluck('name', 'id')->toArray();
129
-            if (count($plans) > 0) {//If Plan Exist For A product, Display Dropdown for Plans
129
+            if (count($plans) > 0) {
130
+//If Plan Exist For A product, Display Dropdown for Plans
130 131
                 $field = "<div class='col-md-4 form-group'>
131 132
                         <label class='required'>"./* @scrutinizer ignore-type */
132 133
                         \Lang::get('message.subscription').'</label>
@@ -137,7 +138,8 @@  discard block
 block discarded – undo
137 138
                             ['class' => 'form-control required', 'id' => 'plan', 'onchange' => 'getPrice(this.value)']
138 139
                         ).'
139 140
                 </div>';
140
-            } else {//If No Plan Exist For A Product
141
+            } else {
142
+//If No Plan Exist For A Product
141 143
                 $userid = $request->input('user');
142 144
                 $price = $controller->cost($productid, $userid);
143 145
             }
@@ -203,7 +205,8 @@  discard block
 block discarded – undo
203 205
 
204 206
     public function getRelease($owner, $repository, $order_id, $file)
205 207
     {
206
-        if ($owner && $repository) {//If the Product is downloaded from Github
208
+        if ($owner && $repository) {
209
+//If the Product is downloaded from Github
207 210
             $github_controller = new \App\Http\Controllers\Github\GithubController();
208 211
             $relese = $github_controller->listRepositories($owner, $repository, $order_id);
209 212
 
Please login to merge, or discard this patch.
app/Http/Controllers/Front/PageController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
78 78
                         })
79 79
 
80
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
80
+                            ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
81 81
                         ->make(true);
82 82
         // ->searchColumns('name', 'content')
83 83
                         // ->orderColumns('name')
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@  discard block
 block discarded – undo
49 49
     public function getPages()
50 50
     {
51 51
         return \DataTables::of($this->page->get())
52
-                        ->addColumn('checkbox', function ($model) {
52
+                        ->addColumn('checkbox', function($model) {
53 53
                             return "<input type='checkbox' class='page_checkbox' 
54 54
                             value=".$model->id.' name=select[] id=check>';
55 55
                         })
56
-                        ->addColumn('name', function ($model) {
56
+                        ->addColumn('name', function($model) {
57 57
                             return ucfirst($model->name);
58 58
                         })
59
-                        ->addColumn('url', function ($model) {
59
+                        ->addColumn('url', function($model) {
60 60
                             return $model->url;
61 61
                         })
62
-                        ->addColumn('created_at', function ($model) {
62
+                        ->addColumn('created_at', function($model) {
63 63
                             $created = $model->created_at;
64 64
                             if ($created) {
65 65
                                 $date1 = new \DateTime($created);
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
                             return $createdate;
72 72
                         })
73 73
 
74
-                        ->addColumn('action', function ($model) {
74
+                        ->addColumn('action', function($model) {
75 75
                             return '<a href='.url('pages/'.$model->id.'/edit')
76 76
                             ." class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
77 77
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
78 78
                         })
79 79
 
80
-                          ->rawColumns(['checkbox', 'name', 'url',  'created_at', 'action'])
80
+                          ->rawColumns(['checkbox', 'name', 'url', 'created_at', 'action'])
81 81
                         ->make(true);
82 82
         // ->searchColumns('name', 'content')
83 83
                         // ->orderColumns('name')
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $selectedParent = $this->page->where('id', $id)->pluck('parent_page_id')->toArray();
110 110
             $parentName = $this->page->where('id', $selectedParent)->pluck('name', 'id')->toArray();
111 111
 
112
-            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate','selectedParent',
112
+            return view('themes.default1.front.page.edit', compact('parents', 'page', 'default', 'selectedDefault', 'publishingDate', 'selectedParent',
113 113
                 'parentName'));
114 114
         } catch (\Exception $ex) {
115 115
             return redirect()->back()->with('fails', $ex->getMessage());
Please login to merge, or discard this patch.
app/Http/Controllers/User/AdminOrderInvoiceController.php 2 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -32,30 +32,30 @@  discard block
 block discarded – undo
32 32
                         ->addColumn('total', function ($model) use ($client) {
33 33
                             return currency_format($model->grand_total, $code = $client->currency);
34 34
                         })
35
-                         ->addColumn('paid', function ($model) use ($client) {
36
-                             $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
37
-                             $c = count($payment);
38
-                             $sum = 0;
39
-                             for ($i = 0; $i <= $c - 1; $i++) {
40
-                                 $sum = $sum + $payment[$i]->amount;
41
-                             }
42
-
43
-                             return currency_format($sum, $code = $client->currency);
44
-                         })
45
-                         ->addColumn('balance', function ($model) use ($client) {
46
-                             $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
47
-                             $c = count($payment);
48
-                             $sum = 0;
49
-                             for ($i = 0; $i <= $c - 1; $i++) {
50
-                                 $sum = $sum + $payment[$i]->amount;
51
-                             }
52
-                             $pendingAmount = ($model->grand_total) - ($sum);
53
-
54
-                             return currency_format($pendingAmount, $code = $client->currency);
55
-                         })
56
-                          ->addColumn('status', function ($model) {
57
-                              return $model->status;
58
-                          })
35
+                            ->addColumn('paid', function ($model) use ($client) {
36
+                                $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
37
+                                $c = count($payment);
38
+                                $sum = 0;
39
+                                for ($i = 0; $i <= $c - 1; $i++) {
40
+                                    $sum = $sum + $payment[$i]->amount;
41
+                                }
42
+
43
+                                return currency_format($sum, $code = $client->currency);
44
+                            })
45
+                            ->addColumn('balance', function ($model) use ($client) {
46
+                                $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
47
+                                $c = count($payment);
48
+                                $sum = 0;
49
+                                for ($i = 0; $i <= $c - 1; $i++) {
50
+                                    $sum = $sum + $payment[$i]->amount;
51
+                                }
52
+                                $pendingAmount = ($model->grand_total) - ($sum);
53
+
54
+                                return currency_format($pendingAmount, $code = $client->currency);
55
+                            })
56
+                            ->addColumn('status', function ($model) {
57
+                                return $model->status;
58
+                            })
59 59
                         ->addColumn('action', function ($model) {
60 60
                             $action = '';
61 61
                             $cont = new \App\Http\Controllers\Order\TaxRatesAndCodeExpiryController();
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
77 77
                                     ."   $editAction $action";
78 78
                         })
79
-                         ->rawColumns(['checkbox', 'date', 'invoice_no', 'total', 'paid', 'balance', 'status', 'action'])
79
+                            ->rawColumns(['checkbox', 'date', 'invoice_no', 'total', 'paid', 'balance', 'status', 'action'])
80 80
                         ->make(true);
81 81
     }
82 82
 
@@ -104,16 +104,16 @@  discard block
 block discarded – undo
104 104
 
105 105
                             return $number;
106 106
                         })
107
-                         ->addColumn('total', function ($model) use ($client) {
108
-                             $price = currency_format($model->price_override, $code = $client->currency);
107
+                            ->addColumn('total', function ($model) use ($client) {
108
+                                $price = currency_format($model->price_override, $code = $client->currency);
109 109
 
110
-                             return $price;
111
-                         })
112
-                         ->addColumn('status', function ($model) {
113
-                             $status = $model->order_status;
110
+                                return $price;
111
+                            })
112
+                            ->addColumn('status', function ($model) {
113
+                                $status = $model->order_status;
114 114
 
115
-                             return $status;
116
-                         })
115
+                                return $status;
116
+                            })
117 117
                         ->addColumn('action', function ($model) {
118 118
                             return '<a href='.url('orders/'.$model->id)." 
119 119
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-eye' 
@@ -150,18 +150,18 @@  discard block
 block discarded – undo
150 150
                         ->addColumn('payment_method', function ($model) {
151 151
                             return $model->payment_method;
152 152
                         })
153
-                         ->addColumn('total', function ($model) use ($client,$extraAmt) {
154
-                             if ($model->invoice_id == 0) {
155
-                                 $amount = currency_format($extraAmt, $code = $client->currency);
156
-                             } else {
157
-                                 $amount = currency_format($model->amount, $code = $client->currency);
158
-                             }
159
-
160
-                             return $amount;
161
-                         })
162
-                         ->addColumn('status', function ($model) {
163
-                             return ucfirst($model->payment_status);
164
-                         })
153
+                            ->addColumn('total', function ($model) use ($client,$extraAmt) {
154
+                                if ($model->invoice_id == 0) {
155
+                                    $amount = currency_format($extraAmt, $code = $client->currency);
156
+                                } else {
157
+                                    $amount = currency_format($model->amount, $code = $client->currency);
158
+                                }
159
+
160
+                                return $amount;
161
+                            })
162
+                            ->addColumn('status', function ($model) {
163
+                                return ucfirst($model->payment_status);
164
+                            })
165 165
 
166 166
                         ->rawColumns(['checkbox', 'invoice_no', 'date', 'payment_method', 'total', 'status'])
167 167
                         ->make(true);
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -14,11 +14,11 @@  discard block
 block discarded – undo
14 14
         $invoices = $invoice->where('user_id', $id)->orderBy('created_at', 'desc')->get();
15 15
 
16 16
         return\ DataTables::of($invoices)
17
-                        ->addColumn('checkbox', function ($model) {
17
+                        ->addColumn('checkbox', function($model) {
18 18
                             return "<input type='checkbox' class='invoice_checkbox' 
19 19
                             value=".$model->id.' name=select[] id=check>';
20 20
                         })
21
-                        ->addColumn('date', function ($model) use ($client) {
21
+                        ->addColumn('date', function($model) use ($client) {
22 22
                             $date1 = new \DateTime($model->date);
23 23
                             $tz = $client->timezone()->first()->name;
24 24
                             $date1->setTimezone(new \DateTimeZone($tz));
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 
27 27
                             return $date;
28 28
                         })
29
-                        ->addColumn('invoice_no', function ($model) {
29
+                        ->addColumn('invoice_no', function($model) {
30 30
                             return  	'<a href='.url('invoices/show?invoiceid='.$model->id).'>'.$model->number.'</a>';
31 31
                         })
32
-                        ->addColumn('total', function ($model) use ($client) {
32
+                        ->addColumn('total', function($model) use ($client) {
33 33
                             return currency_format($model->grand_total, $code = $client->currency);
34 34
                         })
35
-                         ->addColumn('paid', function ($model) use ($client) {
35
+                         ->addColumn('paid', function($model) use ($client) {
36 36
                              $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
37 37
                              $c = count($payment);
38 38
                              $sum = 0;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
                              return currency_format($sum, $code = $client->currency);
44 44
                          })
45
-                         ->addColumn('balance', function ($model) use ($client) {
45
+                         ->addColumn('balance', function($model) use ($client) {
46 46
                              $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
47 47
                              $c = count($payment);
48 48
                              $sum = 0;
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 
54 54
                              return currency_format($pendingAmount, $code = $client->currency);
55 55
                          })
56
-                          ->addColumn('status', function ($model) {
56
+                          ->addColumn('status', function($model) {
57 57
                               return $model->status;
58 58
                           })
59
-                        ->addColumn('action', function ($model) {
59
+                        ->addColumn('action', function($model) {
60 60
                             $action = '';
61 61
                             $cont = new \App\Http\Controllers\Order\TaxRatesAndCodeExpiryController();
62 62
                             $check = $cont->checkExecution($model->id);
@@ -86,35 +86,35 @@  discard block
 block discarded – undo
86 86
         $order = $client->order()->orderBy('created_at', 'desc')->get();
87 87
 
88 88
         return\ DataTables::of($order)
89
-                        ->addColumn('checkbox', function ($model) {
89
+                        ->addColumn('checkbox', function($model) {
90 90
                             return "<input type='checkbox' class='order_checkbox' 
91 91
                             value=".$model->id.' name=select[] id=checkorder>';
92 92
                         })
93
-                        ->addColumn('date', function ($model) {
93
+                        ->addColumn('date', function($model) {
94 94
                             return ucfirst($model->created_at);
95 95
                         })
96
-                        ->addColumn('product', function ($model) {
96
+                        ->addColumn('product', function($model) {
97 97
                             $productName = $model->product()->first() && $model->product()->first()->name ?
98 98
                             $model->product()->first()->name : 'Unknown';
99 99
 
100 100
                             return $productName;
101 101
                         })
102
-                        ->addColumn('number', function ($model) {
102
+                        ->addColumn('number', function($model) {
103 103
                             $number = $model->number;
104 104
 
105 105
                             return $number;
106 106
                         })
107
-                         ->addColumn('total', function ($model) use ($client) {
107
+                         ->addColumn('total', function($model) use ($client) {
108 108
                              $price = currency_format($model->price_override, $code = $client->currency);
109 109
 
110 110
                              return $price;
111 111
                          })
112
-                         ->addColumn('status', function ($model) {
112
+                         ->addColumn('status', function($model) {
113 113
                              $status = $model->order_status;
114 114
 
115 115
                              return $status;
116 116
                          })
117
-                        ->addColumn('action', function ($model) {
117
+                        ->addColumn('action', function($model) {
118 118
                             return '<a href='.url('orders/'.$model->id)." 
119 119
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-eye' 
120 120
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>";
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
         $extraAmt = $this->getExtraAmtPaid($id);
132 132
 
133 133
         return\ DataTables::of($payments)
134
-                        ->addColumn('checkbox', function ($model) {
134
+                        ->addColumn('checkbox', function($model) {
135 135
                             return "<input type='checkbox' class='payment_checkbox' 
136 136
                             value=".$model->id.' name=select[] id=checkpayment>';
137 137
                         })
138
-                        ->addColumn('invoice_no', function ($model) {
138
+                        ->addColumn('invoice_no', function($model) {
139 139
                             return $model->invoice()->first() ? $model->invoice()->first()->number : '--';
140 140
                         })
141
-                        ->addColumn('date', function ($model) {
141
+                        ->addColumn('date', function($model) {
142 142
                             $date = $model->created_at;
143 143
                             $date1 = new \DateTime($date);
144 144
                             $tz = \Auth::user()->timezone()->first()->name;
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
 
148 148
                             return $date;
149 149
                         })
150
-                        ->addColumn('payment_method', function ($model) {
150
+                        ->addColumn('payment_method', function($model) {
151 151
                             return $model->payment_method;
152 152
                         })
153
-                         ->addColumn('total', function ($model) use ($client,$extraAmt) {
153
+                         ->addColumn('total', function($model) use ($client, $extraAmt) {
154 154
                              if ($model->invoice_id == 0) {
155 155
                                  $amount = currency_format($extraAmt, $code = $client->currency);
156 156
                              } else {
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
                              return $amount;
161 161
                          })
162
-                         ->addColumn('status', function ($model) {
162
+                         ->addColumn('status', function($model) {
163 163
                              return ucfirst($model->payment_status);
164 164
                          })
165 165
 
Please login to merge, or discard this patch.