Completed
Push — development ( 877883...280d38 )
by Ashutosh
10:04
created
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/User/ClientController.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -116,28 +116,28 @@
 block discarded – undo
116 116
         );
117 117
 
118 118
         return\ DataTables::of($user->get())
119
-                         ->addColumn('checkbox', function ($model) {
120
-                             return "<input type='checkbox' class='user_checkbox' 
119
+                            ->addColumn('checkbox', function ($model) {
120
+                                return "<input type='checkbox' class='user_checkbox' 
121 121
                             value=".$model->id.' name=select[] id=check>';
122
-                         })
122
+                            })
123 123
                         ->addColumn('first_name', function ($model) {
124 124
                             return '<a href='.url('clients/'.$model->id).'>'
125 125
                             .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>';
126 126
                         })
127
-                         ->addColumn('email', function ($model) {
128
-                             return $model->email;
129
-                         })
130
-                          ->addColumn('created_at', function ($model) {
131
-                              $ends = $model->created_at;
132
-                              if ($ends) {
133
-                                  $date1 = new DateTime($ends);
134
-                                  $tz = \Auth::user()->timezone()->first()->name;
135
-                                  $date1->setTimezone(new DateTimeZone($tz));
136
-                                  $end = $date1->format('M j, Y, g:i a ');
137
-                              }
127
+                            ->addColumn('email', function ($model) {
128
+                                return $model->email;
129
+                            })
130
+                            ->addColumn('created_at', function ($model) {
131
+                                $ends = $model->created_at;
132
+                                if ($ends) {
133
+                                    $date1 = new DateTime($ends);
134
+                                    $tz = \Auth::user()->timezone()->first()->name;
135
+                                    $date1->setTimezone(new DateTimeZone($tz));
136
+                                    $end = $date1->format('M j, Y, g:i a ');
137
+                                }
138 138
 
139
-                              return $end;
140
-                          })
139
+                                return $end;
140
+                            })
141 141
                         // ->showColumns('email', 'created_at')
142 142
                         ->addColumn('active', function ($model) {
143 143
                             if ($model->active == 1) {
Please login to merge, or discard this patch.
app/Http/Controllers/User/AdminOrderInvoiceController.php 2 patches
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -32,28 +32,28 @@  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
-                             return currency_format($sum, $code =$client->currency);
43
-                         })
44
-                         ->addColumn('balance', function ($model) use ($client) {
45
-                             $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
46
-                             $c=count($payment);
47
-                             $sum = 0;
48
-                             for ($i=0 ;  $i <= $c-1 ; $i++) {
49
-                                 $sum = $sum + $payment[$i]->amount;
50
-                             }
51
-                             $pendingAmount = ($model->grand_total)-($sum);
52
-                             return currency_format($pendingAmount, $code =$client->currency);
53
-                         })
54
-                          ->addColumn('status', function ($model) {
55
-                              return $model->status;
56
-                          })
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
+                                return currency_format($sum, $code =$client->currency);
43
+                            })
44
+                            ->addColumn('balance', function ($model) use ($client) {
45
+                                $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
46
+                                $c=count($payment);
47
+                                $sum = 0;
48
+                                for ($i=0 ;  $i <= $c-1 ; $i++) {
49
+                                    $sum = $sum + $payment[$i]->amount;
50
+                                }
51
+                                $pendingAmount = ($model->grand_total)-($sum);
52
+                                return currency_format($pendingAmount, $code =$client->currency);
53
+                            })
54
+                            ->addColumn('status', function ($model) {
55
+                                return $model->status;
56
+                            })
57 57
                         ->addColumn('action', function ($model) {
58 58
                             $action = '';
59 59
                             $cont = new \App\Http\Controllers\Order\TaxRatesAndCodeExpiryController();
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
75 75
                                     ."   $editAction $action";
76 76
                         })
77
-                         ->rawColumns(['checkbox', 'date', 'invoice_no', 'total', 'paid', 'balance', 'status','action'])
77
+                            ->rawColumns(['checkbox', 'date', 'invoice_no', 'total', 'paid', 'balance', 'status','action'])
78 78
                         ->make(true);
79 79
     }
80 80
 
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
 
104 104
                             return ($number);
105 105
                         })
106
-                         ->addColumn('total', function ($model) use ($client) {
107
-                             $price = currency_format($model->price_override, $code = $client->currency);
108
-                             return $price;
109
-                         })
110
-                         ->addColumn('status', function ($model) {
111
-                             $status = $model->order_status;
112
-                             return $status;
113
-                         })
106
+                            ->addColumn('total', function ($model) use ($client) {
107
+                                $price = currency_format($model->price_override, $code = $client->currency);
108
+                                return $price;
109
+                            })
110
+                            ->addColumn('status', function ($model) {
111
+                                $status = $model->order_status;
112
+                                return $status;
113
+                            })
114 114
                         ->addColumn('action', function ($model) {
115 115
                             return '<a href='.url('orders/'.$model->id)." 
116 116
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-eye' 
@@ -147,17 +147,17 @@  discard block
 block discarded – undo
147 147
                             return $model->payment_method;
148 148
                             ;
149 149
                         })
150
-                         ->addColumn('total', function ($model) use ($client,$extraAmt) {
151
-                             if ($model->invoice_id == 0) {
152
-                                 $amount = currency_format($extraAmt, $code = $client->currency);
153
-                             } else {
154
-                                 $amount = currency_format($model->amount, $code = $client->currency);
155
-                             }
156
-                             return $amount;
157
-                         })
158
-                         ->addColumn('status', function ($model) {
159
-                             return ucfirst($model->payment_status);
160
-                         })
150
+                            ->addColumn('total', function ($model) use ($client,$extraAmt) {
151
+                                if ($model->invoice_id == 0) {
152
+                                    $amount = currency_format($extraAmt, $code = $client->currency);
153
+                                } else {
154
+                                    $amount = currency_format($model->amount, $code = $client->currency);
155
+                                }
156
+                                return $amount;
157
+                            })
158
+                            ->addColumn('status', function ($model) {
159
+                                return ucfirst($model->payment_status);
160
+                            })
161 161
                       
162 162
                         ->rawColumns(['checkbox', 'invoice_no', 'date', 'payment_method', 'total', 'status'])
163 163
                         ->make(true);
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -15,46 +15,46 @@  discard block
 block discarded – undo
15 15
         $invoices = $invoice->where('user_id', $id)->orderBy('created_at', 'desc')->get();
16 16
       
17 17
         return\ DataTables::of($invoices)
18
-                        ->addColumn('checkbox', function ($model) {
18
+                        ->addColumn('checkbox', function($model) {
19 19
                             return "<input type='checkbox' class='invoice_checkbox' 
20 20
                             value=".$model->id.' name=select[] id=check>';
21 21
                         })
22
-                        ->addColumn('date', function ($model) use ($client) {
22
+                        ->addColumn('date', function($model) use ($client) {
23 23
                             $date1 = new \DateTime($model->date);
24 24
                             $tz = $client->timezone()->first()->name;
25 25
                             $date1->setTimezone(new \DateTimeZone($tz));
26 26
                             $date = $date1->format('M j, Y, g:i a ');
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) {
33
-                            return currency_format($model->grand_total, $code =$client->currency);
32
+                        ->addColumn('total', function($model) use ($client) {
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
-                             $c=count($payment);
37
+                             $c = count($payment);
38 38
                              $sum = 0;
39
-                             for ($i=0 ;  $i <= $c-1 ; $i++) {
39
+                             for ($i = 0; $i <= $c - 1; $i++) {
40 40
                                  $sum = $sum + $payment[$i]->amount;
41 41
                              }
42
-                             return currency_format($sum, $code =$client->currency);
42
+                             return currency_format($sum, $code = $client->currency);
43 43
                          })
44
-                         ->addColumn('balance', function ($model) use ($client) {
44
+                         ->addColumn('balance', function($model) use ($client) {
45 45
                              $payment = \App\Model\Order\Payment::where('invoice_id', $model->id)->select('amount')->get();
46
-                             $c=count($payment);
46
+                             $c = count($payment);
47 47
                              $sum = 0;
48
-                             for ($i=0 ;  $i <= $c-1 ; $i++) {
48
+                             for ($i = 0; $i <= $c - 1; $i++) {
49 49
                                  $sum = $sum + $payment[$i]->amount;
50 50
                              }
51
-                             $pendingAmount = ($model->grand_total)-($sum);
52
-                             return currency_format($pendingAmount, $code =$client->currency);
51
+                             $pendingAmount = ($model->grand_total) - ($sum);
52
+                             return currency_format($pendingAmount, $code = $client->currency);
53 53
                          })
54
-                          ->addColumn('status', function ($model) {
54
+                          ->addColumn('status', function($model) {
55 55
                               return $model->status;
56 56
                           })
57
-                        ->addColumn('action', function ($model) {
57
+                        ->addColumn('action', function($model) {
58 58
                             $action = '';
59 59
                             $cont = new \App\Http\Controllers\Order\TaxRatesAndCodeExpiryController();
60 60
                             $check = $cont->checkExecution($model->id);
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>"
75 75
                                     ."   $editAction $action";
76 76
                         })
77
-                         ->rawColumns(['checkbox', 'date', 'invoice_no', 'total', 'paid', 'balance', 'status','action'])
77
+                         ->rawColumns(['checkbox', 'date', 'invoice_no', 'total', 'paid', 'balance', 'status', 'action'])
78 78
                         ->make(true);
79 79
     }
80 80
 
@@ -85,33 +85,33 @@  discard block
 block discarded – undo
85 85
         $order = $client->order()->orderBy('created_at', 'desc')->get();
86 86
 
87 87
         return\ DataTables::of($order)
88
-                        ->addColumn('checkbox', function ($model) {
88
+                        ->addColumn('checkbox', function($model) {
89 89
                             return "<input type='checkbox' class='order_checkbox' 
90 90
                             value=".$model->id.' name=select[] id=checkorder>';
91 91
                         })
92
-                        ->addColumn('date', function ($model) {
92
+                        ->addColumn('date', function($model) {
93 93
                             return ucfirst($model->created_at);
94 94
                         })
95
-                        ->addColumn('product', function ($model) {
95
+                        ->addColumn('product', function($model) {
96 96
                             $productName = $model->product()->first() && $model->product()->first()->name ?
97 97
                             $model->product()->first()->name : 'Unknown';
98 98
 
99 99
                             return $productName;
100 100
                         })
101
-                        ->addColumn('number', function ($model) {
102
-                            $number= $model->number;
101
+                        ->addColumn('number', function($model) {
102
+                            $number = $model->number;
103 103
 
104 104
                             return ($number);
105 105
                         })
106
-                         ->addColumn('total', function ($model) use ($client) {
106
+                         ->addColumn('total', function($model) use ($client) {
107 107
                              $price = currency_format($model->price_override, $code = $client->currency);
108 108
                              return $price;
109 109
                          })
110
-                         ->addColumn('status', function ($model) {
110
+                         ->addColumn('status', function($model) {
111 111
                              $status = $model->order_status;
112 112
                              return $status;
113 113
                          })
114
-                        ->addColumn('action', function ($model) {
114
+                        ->addColumn('action', function($model) {
115 115
                             return '<a href='.url('orders/'.$model->id)." 
116 116
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-eye' 
117 117
                             style='color:white;'> </i>&nbsp;&nbsp;View</a>";
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
         $extraAmt = $this->getExtraAmtPaid($id);
129 129
 
130 130
         return\ DataTables::of($payments)
131
-                        ->addColumn('checkbox', function ($model) {
131
+                        ->addColumn('checkbox', function($model) {
132 132
                             return "<input type='checkbox' class='payment_checkbox' 
133 133
                             value=".$model->id.' name=select[] id=checkpayment>';
134 134
                         })
135
-                        ->addColumn('invoice_no', function ($model) {
135
+                        ->addColumn('invoice_no', function($model) {
136 136
                             return $model->invoice()->first() ? $model->invoice()->first()->number : '--';
137 137
                         })
138
-                        ->addColumn('date', function ($model) {
138
+                        ->addColumn('date', function($model) {
139 139
                             $date = $model->created_at;
140 140
                             $date1 = new \DateTime($date);
141 141
                             $tz = \Auth::user()->timezone()->first()->name;
@@ -143,11 +143,11 @@  discard block
 block discarded – undo
143 143
                             $date = $date1->format('M j, Y, g:i a ');
144 144
                             return $date;
145 145
                         })
146
-                        ->addColumn('payment_method', function ($model) {
146
+                        ->addColumn('payment_method', function($model) {
147 147
                             return $model->payment_method;
148 148
                             ;
149 149
                         })
150
-                         ->addColumn('total', function ($model) use ($client,$extraAmt) {
150
+                         ->addColumn('total', function($model) use ($client, $extraAmt) {
151 151
                              if ($model->invoice_id == 0) {
152 152
                                  $amount = currency_format($extraAmt, $code = $client->currency);
153 153
                              } else {
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                              }
156 156
                              return $amount;
157 157
                          })
158
-                         ->addColumn('status', function ($model) {
158
+                         ->addColumn('status', function($model) {
159 159
                              return ucfirst($model->payment_status);
160 160
                          })
161 161
                       
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AuthController.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -319,11 +319,11 @@
 block discarded – undo
319 319
             ->orderBy('state_subdivision_name', 'asc')->get();
320 320
 
321 321
             if (count($states)>0) {
322
-                 echo '<option value="">Choose</option>';
322
+                    echo '<option value="">Choose</option>';
323 323
                 foreach ($states as $stateList) {
324 324
                 echo '<option value='.$stateList->state_subdivision_code.'>'
325 325
                 .$stateList->state_subdivision_name.'</option>';
326
-             }
326
+                }
327 327
             } else {
328 328
                 echo "<option value=''>No States Available</option>";
329 329
             }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@
 block discarded – undo
318 318
             $states = \App\Model\Common\State::where('country_code_char2', $id)
319 319
             ->orderBy('state_subdivision_name', 'asc')->get();
320 320
 
321
-            if (count($states)>0) {
321
+            if (count($states) > 0) {
322 322
                  echo '<option value="">Choose</option>';
323 323
                 foreach ($states as $stateList) {
324 324
                 echo '<option value='.$stateList->state_subdivision_code.'>'
Please login to merge, or discard this patch.
app/Http/Controllers/Api/ApiController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,17 +21,17 @@
 block discarded – undo
21 21
 
22 22
             $url_info = parse_url($url);
23 23
             $domain1 = $url_info['host'];
24
-            $url = preg_replace('#^www\.(.+\.)#i', '$1', $url_info['host']);//remove www from domain
24
+            $url = preg_replace('#^www\.(.+\.)#i', '$1', $url_info['host']); //remove www from domain
25 25
             $domain2 = 'www.'.$url;
26 26
             $domain1check = $url.','.$domain2;
27 27
             $orders = new Order();
28 28
             $order = $orders->where('domain', $domain1check)->orWhere('domain', $url)->orWhere('domain', $domain2)->first();
29 29
             if ($order) {
30
-                $product = Product::where('id',$order->product)->pluck('name')->first();
30
+                $product = Product::where('id', $order->product)->pluck('name')->first();
31 31
                 $result = 'success';
32 32
             }
33 33
 
34
-            return response()->json(compact('result','product'));
34
+            return response()->json(compact('result', 'product'));
35 35
         } catch (Exception $ex) {
36 36
             $error = $ex->getMessage();
37 37
 
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductController.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -125,10 +125,10 @@  discard block
 block discarded – undo
125 125
                             ->addColumn('name', function ($model) {
126 126
                                 return ucfirst($model->name);
127 127
                             })
128
-                              ->addColumn('image', function ($model) {
129
-                                  // return $model->image;
130
-                                  return "<img src= '$model->image' + height=\"80\"/>";
131
-                              })
128
+                                ->addColumn('image', function ($model) {
129
+                                    // return $model->image;
130
+                                    return "<img src= '$model->image' + height=\"80\"/>";
131
+                                })
132 132
                             ->addColumn('type', function ($model) {
133 133
                                 if ($this->type->where('id', $model->type)->first()) {
134 134
                                     return $this->type->where('id', $model->type)->first()->name;
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
         $this->validate($request, [
175 175
         'producttitle' => 'required',
176 176
         'version'      => 'required',
177
-       'filename'     => 'required',
178
-       ],
179
-       ['filename.required' => 'Please Uplaod A file',
177
+        'filename'     => 'required',
178
+        ],
179
+        ['filename.required' => 'Please Uplaod A file',
180 180
         ]);
181 181
 
182 182
         try {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -118,18 +118,18 @@  discard block
 block discarded – undo
118 118
 
119 119
             return\ DataTables::of($new_product)
120 120
 
121
-                            ->addColumn('checkbox', function ($model) {
121
+                            ->addColumn('checkbox', function($model) {
122 122
                                 return "<input type='checkbox' class='product_checkbox' 
123 123
                                 value=".$model->id.' name=select[] id=check>';
124 124
                             })
125
-                            ->addColumn('name', function ($model) {
125
+                            ->addColumn('name', function($model) {
126 126
                                 return ucfirst($model->name);
127 127
                             })
128
-                              ->addColumn('image', function ($model) {
128
+                              ->addColumn('image', function($model) {
129 129
                                   // return $model->image;
130 130
                                   return "<img src= '$model->image' + height=\"80\"/>";
131 131
                               })
132
-                            ->addColumn('type', function ($model) {
132
+                            ->addColumn('type', function($model) {
133 133
                                 if ($this->type->where('id', $model->type)->first()) {
134 134
                                     return $this->type->where('id', $model->type)->first()->name;
135 135
                                 } else {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                                 }
138 138
                             })
139 139
 
140
-                            ->addColumn('group', function ($model) {
140
+                            ->addColumn('group', function($model) {
141 141
                                 if ($this->group->where('id', $model->group)->first()) {
142 142
                                     return $this->group->where('id', $model->group)->first()->name;
143 143
                                 } else {
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
                                 }
146 146
                             })
147 147
 
148
-                            ->addColumn('Action', function ($model) {
148
+                            ->addColumn('Action', function($model) {
149 149
                                 $permissions = LicensePermissionsController::getPermissionsForProduct($model->id);
150 150
                                 $url = '';
151 151
                                 if ($permissions['downloadPermission'] == 1) {
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
193 193
             if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
194 194
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
195
-                $addProductToAutoUpdate = $updateClassObj->addNewVersion($product_id->id, $request->input('version'),$request->input('filename'), '1');
195
+                $addProductToAutoUpdate = $updateClassObj->addNewVersion($product_id->id, $request->input('version'), $request->input('filename'), '1');
196 196
             }
197 197
             $response = ['success'=>'true', 'message'=>'Product Uploaded Successfully'];
198 198
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -190,7 +190,8 @@  discard block
 block discarded – undo
190 190
             $this->product_upload->save();
191 191
             $this->product->where('id', $product_id->id)->update(['version'=>$request->input('version')]);
192 192
             $autoUpdateStatus = StatusSetting::pluck('update_settings')->first();
193
-            if ($autoUpdateStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
193
+            if ($autoUpdateStatus == 1) {
194
+//If License Setting Status is on,Add Product to the License Manager
194 195
                 $updateClassObj = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
195 196
                 $addProductToAutoUpdate = $updateClassObj->addNewVersion($product_id->id, $request->input('version'),$request->input('filename'), '1');
196 197
             }
@@ -280,7 +281,8 @@  discard block
 block discarded – undo
280 281
 
281 282
         try {
282 283
             $licenseStatus = StatusSetting::pluck('license_status')->first();
283
-            if ($licenseStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
284
+            if ($licenseStatus == 1) {
285
+//If License Setting Status is on,Add Product to the License Manager
284 286
                 $addProductToLicensing = $this->licensing->addNewProduct($input['name'], $input['product_sku']);
285 287
             }
286 288
             $licenseCont = new \App\Http\Controllers\AutoUpdate\AutoUpdateController();
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ExtendedBaseProductController.php 1 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/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/Common/TemplateController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -117,18 +117,18 @@  discard block
 block discarded – undo
117 117
     public function getTemplates()
118 118
     {
119 119
         return \DataTables::of($this->template->select('id', 'name', 'type')->get())
120
-                        ->addColumn('checkbox', function ($model) {
120
+                        ->addColumn('checkbox', function($model) {
121 121
                             return "<input type='checkbox' class='template_checkbox' 
122 122
                             value=".$model->id.' name=select[] id=check>';
123 123
                         })
124 124
 
125
-                         ->addColumn('name', function ($model) {
125
+                         ->addColumn('name', function($model) {
126 126
                              return $model->name;
127 127
                          })
128
-                        ->addColumn('type', function ($model) {
128
+                        ->addColumn('type', function($model) {
129 129
                             return $this->type->where('id', $model->type)->first()->name;
130 130
                         })
131
-                        ->addColumn('action', function ($model) {
131
+                        ->addColumn('action', function($model) {
132 132
                             return '<a href='.url('templates/'.$model->id.'/edit').
133 133
                             " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
134 134
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 
279 279
             $settings = \App\Model\Common\Setting::find(1);
280 280
             $fromname = $settings->company;
281
-            \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
281
+            \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
282 282
                 $m->from($from, $fromname);
283 283
 
284 284
                 $m->to($to, $toname)->subject($subject);
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
                     $prices[] = $value->planPrice()->where('currency', $currencyAndSymbol['currency'])->min('add_price');
379 379
                 }
380 380
                 $price = min($prices);
381
-                $format = currency_format($price,$code=$currencyAndSymbol['currency']);
381
+                $format = currency_format($price, $code = $currencyAndSymbol['currency']);
382 382
                 $finalPrice = str_replace($currencyAndSymbol['symbol'], '', $format);
383 383
                 $cost = '<span class="price-unit">'.$currencyAndSymbol['symbol'].'</span>'.$finalPrice;
384 384
             }
Please login to merge, or discard this patch.