@@ -117,7 +117,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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); |
@@ -263,7 +263,7 @@ |
||
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(); |
@@ -31,19 +31,19 @@ |
||
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, '...'); |
@@ -31,24 +31,24 @@ |
||
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> Edit</a>"; |
@@ -127,9 +127,9 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | ]); |
@@ -122,18 +122,18 @@ discard block |
||
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> Edit</a>"; |
@@ -284,7 +284,7 @@ discard block |
||
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); |
@@ -33,7 +33,7 @@ |
||
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() |
@@ -33,6 +33,6 @@ |
||
33 | 33 | return ''; |
34 | 34 | |
35 | 35 | // return "Product has been {$eventName}"; |
36 | - // \Auth::user()->activity; |
|
36 | + // \Auth::user()->activity; |
|
37 | 37 | } |
38 | 38 | } |
@@ -33,6 +33,6 @@ |
||
33 | 33 | return ''; |
34 | 34 | |
35 | 35 | // return "Product has been {$eventName}"; |
36 | - // \Auth::user()->activity; |
|
36 | + // \Auth::user()->activity; |
|
37 | 37 | } |
38 | 38 | } |
@@ -83,22 +83,22 @@ discard block |
||
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 |
||
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 |
||
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(); |
@@ -61,19 +61,19 @@ discard block |
||
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 |
||
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 |
||
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> Edit</a>"; |
@@ -107,18 +107,18 @@ discard block |
||
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 |
||
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 |
||
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). |
@@ -119,10 +119,10 @@ discard block |
||
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 |
||
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()); |
@@ -253,7 +253,8 @@ |
||
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')) { |
@@ -56,8 +56,8 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -55,8 +55,8 @@ |
||
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 |