Completed
Push — development ( 059e30...d1b094 )
by Ashutosh
09:16
created
app/Http/Controllers/Front/CheckoutController.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                     ], [
118 118
                 'domain.*.required' => 'Please provide Domain name',
119 119
                 //'domain.*.url'      => 'Domain name is not valid',
120
-                       ]);
120
+                        ]);
121 121
         }
122 122
 
123 123
         try {
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
             $items = \Cart::getContent();
330 330
             foreach ($items as $item) {
331 331
 
332
-               //this is product
332
+                //this is product
333 333
                 $id = $item->id;
334 334
                 $this->AddProductToOrder($id);
335 335
             }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                 $ends_at = '';
388 388
             }
389 389
             $this->subscription->create(['user_id' => \Auth::user()->id,
390
-             'plan_id'                             => $planid, 'order_id' => $orderid, 'ends_at' => $ends_at, ]);
390
+                'plan_id'                             => $planid, 'order_id' => $orderid, 'ends_at' => $ends_at, ]);
391 391
         } catch (\Exception $ex) {
392 392
             app('log')->error($ex->getMessage());
393 393
             Bugsnag::notifyException($ex);
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
             $invoiceItem = $this->invoiceItem->create(['invoice_id' => $invoiceid,
439 439
                 'product_name'                                      => $product_name, 'regular_price' => $regular_price,
440 440
                 'quantity'                                          => $quantity, 'tax_name' => $tax_name,
441
-                 'tax_percentage'                                   => $tax_percentage, 'subtotal' => $subtotal, ]);
441
+                    'tax_percentage'                                   => $tax_percentage, 'subtotal' => $subtotal, ]);
442 442
         } catch (\Exception $ex) {
443 443
             app('log')->error($ex->getMessage());
444 444
             Bugsnag::notifyException($ex);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@
 block discarded – undo
263 263
                 $r = $mailchimp->updateSubscriberForFreeProduct(\Auth::user()->email, $check_product_category->id);
264 264
                 $url = '';
265 265
                 if ($check_product_category->category) {
266
-                    $url = view('themes.default1.front.postCheckoutTemplate', compact('invoice','date',
266
+                    $url = view('themes.default1.front.postCheckoutTemplate', compact('invoice', 'date',
267 267
                         'product', 'items', 'attributes', 'state'))->render();
268 268
                 }
269 269
                 \Cart::clear();
Please login to merge, or discard this patch.
app/Http/Controllers/Front/WidgetController.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -31,19 +31,19 @@
 block discarded – undo
31 31
     public function getPages()
32 32
     {
33 33
         return \DataTables::of($this->widget->get())
34
-                       ->addColumn('checkbox', function ($model) {
35
-                           return "<input type='checkbox' class='widget_checkbox' 
34
+                        ->addColumn('checkbox', function ($model) {
35
+                            return "<input type='checkbox' class='widget_checkbox' 
36 36
                             value=".$model->id.' name=select[] id=check>';
37
-                       })
38
-                          ->addColumn('name', function ($model) {
39
-                              return ucfirst($model->name);
40
-                          })
37
+                        })
38
+                            ->addColumn('name', function ($model) {
39
+                                return ucfirst($model->name);
40
+                            })
41 41
                             ->addColumn('type', function ($model) {
42 42
                                 return $model->type;
43 43
                             })
44
-                              ->addColumn('created_at', function ($model) {
45
-                                  return $model->created_at;
46
-                              })
44
+                                ->addColumn('created_at', function ($model) {
45
+                                    return $model->created_at;
46
+                                })
47 47
                         // ->showColumns('name', 'type', 'created_at')
48 48
                         ->addColumn('content', function ($model) {
49 49
                             return str_limit($model->content, 10, '...');
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,24 +31,24 @@
 block discarded – undo
31 31
     public function getPages()
32 32
     {
33 33
         return \DataTables::of($this->widget->get())
34
-                       ->addColumn('checkbox', function ($model) {
34
+                       ->addColumn('checkbox', function($model) {
35 35
                            return "<input type='checkbox' class='widget_checkbox' 
36 36
                             value=".$model->id.' name=select[] id=check>';
37 37
                        })
38
-                          ->addColumn('name', function ($model) {
38
+                          ->addColumn('name', function($model) {
39 39
                               return ucfirst($model->name);
40 40
                           })
41
-                            ->addColumn('type', function ($model) {
41
+                            ->addColumn('type', function($model) {
42 42
                                 return $model->type;
43 43
                             })
44
-                              ->addColumn('created_at', function ($model) {
44
+                              ->addColumn('created_at', function($model) {
45 45
                                   return $model->created_at;
46 46
                               })
47 47
                         // ->showColumns('name', 'type', 'created_at')
48
-                        ->addColumn('content', function ($model) {
48
+                        ->addColumn('content', function($model) {
49 49
                             return str_limit($model->content, 10, '...');
50 50
                         })
51
-                        ->addColumn('action', function ($model) {
51
+                        ->addColumn('action', function($model) {
52 52
                             return '<a href='.url('widgets/'.$model->id.'/edit')."
53 53
                              class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
54 54
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
Please login to merge, or discard this patch.
app/Http/Controllers/Common/TemplateController.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
                             value=".$model->id.' name=select[] id=check>';
128 128
                         })
129 129
 
130
-                         ->addColumn('name', function ($model) {
131
-                             return $model->name;
132
-                         })
130
+                            ->addColumn('name', function ($model) {
131
+                                return $model->name;
132
+                            })
133 133
                         ->addColumn('type', function ($model) {
134 134
                             return $this->type->where('id', $model->type)->first()->name;
135 135
                         })
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     }
274 274
 
275 275
     public function mailing($from, $to, $data, $subject, $replace = [],
276
-     $type = '', $fromname = '', $toname = '', $cc = [], $attach = [])
276
+        $type = '', $fromname = '', $toname = '', $cc = [], $attach = [])
277 277
     {
278 278
         try {
279 279
             $transform = [];
@@ -305,10 +305,10 @@  discard block
 block discarded – undo
305 305
                 'date' => date('Y-m-d H:i:s'),
306 306
             'from'     => $from,
307 307
             'to'       => $to,
308
-             'subject' => $subject,
308
+                'subject' => $subject,
309 309
             'body'     => $data,
310
-          'status'     => 'success',
311
-          ]);
310
+            'status'     => 'success',
311
+            ]);
312 312
 
313 313
             return 'success';
314 314
         } catch (\Exception $ex) {
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             'date'     => date('Y-m-d H:i:s'),
317 317
             'from'     => $from,
318 318
             'to'       => $to,
319
-             'subject' => $subject,
319
+                'subject' => $subject,
320 320
             'body'     => $data,
321 321
             'status'   => 'failed',
322 322
         ]);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,18 +122,18 @@  discard block
 block discarded – undo
122 122
     public function getTemplates()
123 123
     {
124 124
         return \DataTables::of($this->template->select('id', 'name', 'type')->get())
125
-                        ->addColumn('checkbox', function ($model) {
125
+                        ->addColumn('checkbox', function($model) {
126 126
                             return "<input type='checkbox' class='template_checkbox' 
127 127
                             value=".$model->id.' name=select[] id=check>';
128 128
                         })
129 129
 
130
-                         ->addColumn('name', function ($model) {
130
+                         ->addColumn('name', function($model) {
131 131
                              return $model->name;
132 132
                          })
133
-                        ->addColumn('type', function ($model) {
133
+                        ->addColumn('type', function($model) {
134 134
                             return $this->type->where('id', $model->type)->first()->name;
135 135
                         })
136
-                        ->addColumn('action', function ($model) {
136
+                        ->addColumn('action', function($model) {
137 137
                             return '<a href='.url('templates/'.$model->id.'/edit').
138 138
                             " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
139 139
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
             
285 285
             $settings = \App\Model\Common\Setting::find(1);
286 286
             $fromname = $settings->company;
287
-            \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
287
+            \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
288 288
                 $m->from($from, $fromname);
289 289
 
290 290
                 $m->to($to, $toname)->subject($subject);
Please login to merge, or discard this patch.
app/Model/Payment/Currency.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         return '';
34 34
 
35 35
         // return "Product  has been {$eventName}";
36
-         // \Auth::user()->activity;
36
+            // \Auth::user()->activity;
37 37
     }
38 38
 
39 39
     public function country()
Please login to merge, or discard this patch.
app/Model/Common/ChatScript.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         return '';
34 34
 
35 35
         // return "Product  has been {$eventName}";
36
-         // \Auth::user()->activity;
36
+            // \Auth::user()->activity;
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
app/Model/Product/ProductCategory.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         return '';
34 34
 
35 35
         // return "Product  has been {$eventName}";
36
-         // \Auth::user()->activity;
36
+            // \Auth::user()->activity;
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Product/PlanController.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -83,22 +83,22 @@  discard block
 block discarded – undo
83 83
 
84 84
                             return ucfirst($response);
85 85
                         })
86
-                         ->addColumn('price', function ($model) use ($defaultCurrency) {
87
-                             $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
86
+                            ->addColumn('price', function ($model) use ($defaultCurrency) {
87
+                                $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
88 88
                             ->pluck('add_price')->first();
89
-                             if ($price != null) {
90
-                                 return $price;
91
-                             } else {
92
-                                 return 'Not Available';
93
-                             }
94
-                         })
95
-                         ->addColumn('currency', function ($model) use ($defaultCurrency) {
96
-                             if ($defaultCurrency && $defaultCurrency != null) {
97
-                                 return $defaultCurrency;
98
-                             } else {
99
-                                 return 'Not Available';
100
-                             }
101
-                         })
89
+                                if ($price != null) {
90
+                                    return $price;
91
+                                } else {
92
+                                    return 'Not Available';
93
+                                }
94
+                            })
95
+                            ->addColumn('currency', function ($model) use ($defaultCurrency) {
96
+                                if ($defaultCurrency && $defaultCurrency != null) {
97
+                                    return $defaultCurrency;
98
+                                } else {
99
+                                    return 'Not Available';
100
+                                }
101
+                            })
102 102
                         ->addColumn('action', function ($model) {
103 103
                             return '<a href='.url('plans/'.$model->id.'/edit')." 
104 104
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' 
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
         $products = $this->product->pluck('name', 'id')->toArray();
191 191
         foreach ($products as $key => $product) {
192 192
             $selectedProduct = $this->product->where('id', $plan->product)
193
-          ->pluck('name', 'id', 'subscription')->toArray();
193
+            ->pluck('name', 'id', 'subscription')->toArray();
194 194
         }
195 195
         $selectedPeriods = $this->period->where('days', $plan->days)
196
-       ->pluck('name', 'days')->toArray();
196
+        ->pluck('name', 'days')->toArray();
197 197
 
198 198
         return view('themes.default1.product.plan.edit',
199 199
             compact('plan', 'currency', 'add_price', 'renew_price', 'periods', 'products',
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             'name'          => 'required',
217 217
             'add_price.*'   => 'required',
218 218
             'product'       => 'required',
219
-              'days'        => $days_rule.'numeric',
219
+                'days'        => $days_rule.'numeric',
220 220
         ]);
221 221
         $plan = $this->plan->where('id', $id)->first();
222 222
         $plan->fill($request->input())->save();
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,19 +61,19 @@  discard block
 block discarded – undo
61 61
         $defaultCurrency = Setting::where('id', 1)->value('default_currency');
62 62
 
63 63
         return\ DataTables::of($new_plan)
64
-                        ->addColumn('checkbox', function ($model) {
64
+                        ->addColumn('checkbox', function($model) {
65 65
                             return "<input type='checkbox' class='plan_checkbox' 
66 66
                             value=".$model->id.' name=select[] id=check>';
67 67
                         })
68
-                        ->addColumn('name', function ($model) {
68
+                        ->addColumn('name', function($model) {
69 69
                             return ucfirst($model->name);
70 70
                         })
71
-                        ->addColumn('days', function ($model) {
71
+                        ->addColumn('days', function($model) {
72 72
                             $months = $model->days / 30;
73 73
 
74 74
                             return round($months);
75 75
                         })
76
-                        ->addColumn('product', function ($model) {
76
+                        ->addColumn('product', function($model) {
77 77
                             $productid = $model->product;
78 78
                             $product = $this->product->where('id', $productid)->first();
79 79
                             $response = '';
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
                             return ucfirst($response);
85 85
                         })
86
-                         ->addColumn('price', function ($model) use ($defaultCurrency) {
86
+                         ->addColumn('price', function($model) use ($defaultCurrency) {
87 87
                              $price = PlanPrice::where('plan_id', $model->id)->where('currency', $defaultCurrency)
88 88
                             ->pluck('add_price')->first();
89 89
                              if ($price != null) {
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
                                  return 'Not Available';
93 93
                              }
94 94
                          })
95
-                         ->addColumn('currency', function ($model) use ($defaultCurrency) {
95
+                         ->addColumn('currency', function($model) use ($defaultCurrency) {
96 96
                              if ($defaultCurrency && $defaultCurrency != null) {
97 97
                                  return $defaultCurrency;
98 98
                              } else {
99 99
                                  return 'Not Available';
100 100
                              }
101 101
                          })
102
-                        ->addColumn('action', function ($model) {
102
+                        ->addColumn('action', function($model) {
103 103
                             return '<a href='.url('plans/'.$model->id.'/edit')." 
104 104
                             class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' 
105 105
                             style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductController.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -107,18 +107,18 @@  discard block
 block discarded – undo
107 107
 
108 108
                 return\ DataTables::of($new_product)
109 109
 
110
-                            ->addColumn('checkbox', function ($model) {
110
+                            ->addColumn('checkbox', function($model) {
111 111
                                 return "<input type='checkbox' class='product_checkbox' 
112 112
                                 value=".$model->id.' name=select[] id=check>';
113 113
                             })
114
-                            ->addColumn('name', function ($model) {
114
+                            ->addColumn('name', function($model) {
115 115
                                 return ucfirst($model->name);
116 116
                             })
117
-                              ->addColumn('image', function ($model) {
117
+                              ->addColumn('image', function($model) {
118 118
                                   // return $model->image;
119 119
                                   return "<img src= '$model->image' + height=\"80\"/>";
120 120
                               })
121
-                            ->addColumn('type', function ($model) {
121
+                            ->addColumn('type', function($model) {
122 122
                                 if ($this->type->where('id', $model->type)->first()) {
123 123
                                     return $this->type->where('id', $model->type)->first()->name;
124 124
                                 } else {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
                                 }
127 127
                             })
128 128
 
129
-                            ->addColumn('group', function ($model) {
129
+                            ->addColumn('group', function($model) {
130 130
                                 if ($this->group->where('id', $model->group)->first()) {
131 131
                                     return $this->group->where('id', $model->group)->first()->name;
132 132
                                 } else {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                                 }
135 135
                             })
136 136
 
137
-                            ->addColumn('Action', function ($model) {
137
+                            ->addColumn('Action', function($model) {
138 138
                                 $url = '';
139 139
                                 if ($model->type == 2) {
140 140
                                     $url = '<a href='.url('product/download/'.$model->id).
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -119,10 +119,10 @@  discard block
 block discarded – undo
119 119
                             ->addColumn('name', function ($model) {
120 120
                                 return ucfirst($model->name);
121 121
                             })
122
-                              ->addColumn('image', function ($model) {
123
-                                  // return $model->image;
124
-                                  return "<img src= '$model->image' + height=\"80\"/>";
125
-                              })
122
+                                ->addColumn('image', function ($model) {
123
+                                    // return $model->image;
124
+                                    return "<img src= '$model->image' + height=\"80\"/>";
125
+                                })
126 126
                             ->addColumn('type', function ($model) {
127 127
                                 if ($this->type->where('id', $model->type)->first()) {
128 128
                                     return $this->type->where('id', $model->type)->first()->name;
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
                         'description'=> 'required',
344 344
                         'image'      => 'sometimes | mimes:jpeg,jpg,png,gif | max:1000',
345 345
                         'product_sku'=> 'required',
346
-      ]);
346
+        ]);
347 347
 
348 348
             if ($v->fails()) {
349 349
                 return redirect()->back()->with('errors', $v->errors());
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -253,7 +253,8 @@
 block discarded – undo
253 253
 
254 254
             try {
255 255
                 $licenseStatus = StatusSetting::pluck('license_status')->first();
256
-                if ($licenseStatus == 1) { //If License Setting Status is on,Add Product to the License Manager
256
+                if ($licenseStatus == 1) {
257
+//If License Setting Status is on,Add Product to the License Manager
257 258
                     $addProductToLicensing = $this->licensing->addNewProduct($input['name'], $input['product_sku']);
258 259
                 }
259 260
                 if ($request->hasFile('image')) {
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
         return view('themes.default1.common.dashboard', compact('totalSalesINR', 'totalSalesUSD',
57 57
                 'yearlySalesINR', 'yearlySalesUSD', 'monthlySalesINR', 'monthlySalesUSD', 'users',
58 58
                 'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices',
59
-                 'products', 'arrayCountList', 'pendingPaymentINR', 'pendingPaymentUSD', 'status','startSubscriptionDate',
60
-                 'endSubscriptionDate'));
59
+                    'products', 'arrayCountList', 'pendingPaymentINR', 'pendingPaymentUSD', 'status','startSubscriptionDate',
60
+                    'endSubscriptionDate'));
61 61
     }
62 62
 
63 63
     /**
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         // dd($currentYear,$currentMonth );
155 155
         $total = Invoice::whereYear('created_at', '=', $currentYear)->whereMonth('created_at', '=', $currentMonth)
156 156
                 ->where('currency', 'USD')
157
-                 ->where('status', '=', 'success')
157
+                    ->where('status', '=', 'success')
158 158
                 ->pluck('grand_total')->all();
159 159
         $grandTotal = array_sum($total);
160 160
 
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
     public function getAllUsers()
202 202
     {
203 203
         $allUsers = User::orderBy('created_at', 'desc')->where('active', 1)->where('mobile_verified', 1)
204
-              ->take(20)
205
-              ->get()
206
-              ->toArray();
204
+                ->take(20)
205
+                ->get()
206
+                ->toArray();
207 207
 
208 208
         return $allUsers;
209 209
     }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         $dayUtc = new Carbon('-30 days');
239 239
         $minus30Day = $dayUtc->toDateTimeString();
240 240
         $recentOrders = Order::where('created_at', '>', $minus30Day)->orderBy('created_at', 'desc')
241
-                 ->where('price_override', '>', 0)->get();
241
+                    ->where('price_override', '>', 0)->get();
242 242
 
243 243
         return $recentOrders;
244 244
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@
 block discarded – undo
55 55
 
56 56
         return view('themes.default1.common.dashboard', compact('totalSalesINR', 'totalSalesUSD',
57 57
                 'yearlySalesINR', 'yearlySalesUSD', 'monthlySalesINR', 'monthlySalesUSD', 'users',
58
-                'count_users', 'arraylists', 'productSoldlists','orders','subscriptions','invoices',
59
-                 'products', 'arrayCountList', 'pendingPaymentINR', 'pendingPaymentUSD', 'status','startSubscriptionDate',
58
+                'count_users', 'arraylists', 'productSoldlists', 'orders', 'subscriptions', 'invoices',
59
+                 'products', 'arrayCountList', 'pendingPaymentINR', 'pendingPaymentUSD', 'status', 'startSubscriptionDate',
60 60
                  'endSubscriptionDate'));
61 61
     }
62 62
 
Please login to merge, or discard this patch.