@@ -50,18 +50,18 @@ discard block |
||
50 | 50 | } |
51 | 51 | if ($interestGroupIdForNo && $productGroupId) { |
52 | 52 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
53 | - 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true], |
|
54 | - ]); |
|
53 | + 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true], |
|
54 | + ]); |
|
55 | 55 | //refer to https://us7.api.mailchimp.com/playground |
56 | 56 | } elseif ($interestGroupIdForNo && $productGroupId == null) { |
57 | 57 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
58 | - 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false], |
|
59 | - ]); |
|
58 | + 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false], |
|
59 | + ]); |
|
60 | 60 | //refer to https://us7.api.mailchimp.com/playground |
61 | 61 | } elseif ($productGroupId && $interestGroupIdForNo == null || $interestGroupIdForYes == null) { |
62 | 62 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
63 | - 'interests' => [$productGroupId =>true], |
|
64 | - ]); |
|
63 | + 'interests' => [$productGroupId =>true], |
|
64 | + ]); |
|
65 | 65 | } |
66 | 66 | } catch (Exception $ex) { |
67 | 67 | $exe = json_decode($ex->getMessage(), true); |
@@ -85,18 +85,18 @@ discard block |
||
85 | 85 | } |
86 | 86 | if ($interestGroupIdForNo && $productGroupId) { |
87 | 87 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
88 | - 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true, $productGroupId =>true], |
|
89 | - //refer to https://us7.api.mailchimp.com/playground |
|
90 | - ]); |
|
88 | + 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true, $productGroupId =>true], |
|
89 | + //refer to https://us7.api.mailchimp.com/playground |
|
90 | + ]); |
|
91 | 91 | } elseif ($interestGroupIdForNo && $productGroupId == null) { |
92 | 92 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
93 | - 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true], |
|
94 | - ]); |
|
93 | + 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true], |
|
94 | + ]); |
|
95 | 95 | //refer to https://us7.api.mailchimp.com/playground |
96 | 96 | } elseif ($productGroupId && $interestGroupIdForNo == null || $interestGroupIdForYes == null) { |
97 | 97 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
98 | - 'interests' => [$productGroupId =>true], |
|
99 | - ]); |
|
98 | + 'interests' => [$productGroupId =>true], |
|
99 | + ]); |
|
100 | 100 | } |
101 | 101 | //refer to https://us7.api.mailchimp.com/playground |
102 | 102 | } catch (Exception $ex) { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | try { |
59 | 59 | $merge_fields = $this->field($email); |
60 | 60 | $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No |
61 | - $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes |
|
61 | + $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes |
|
62 | 62 | $result = $this->mailchimp->post("lists/$this->list_id/members", [ |
63 | 63 | 'status' => $this->mailchimp_set->subscribe_status, |
64 | 64 | 'email_address' => $email, |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $country = Country::where('country_code_char2', $user->country)->pluck('nicename')->first(); |
115 | 115 | if ($user) { |
116 | 116 | $fields = ['first_name', 'last_name', 'company', 'mobile', |
117 | - 'address', 'town', 'country', 'state', 'zip', 'active', 'role', 'source', ]; |
|
117 | + 'address', 'town', 'country', 'state', 'zip', 'active', 'role', 'source', ]; |
|
118 | 118 | $relation = $this->relation; |
119 | 119 | $merge_fields = []; |
120 | 120 | foreach ($fields as $field) { |
@@ -241,11 +241,11 @@ discard block |
||
241 | 241 | |
242 | 242 | $this->addProductInterestFieldsToAgora(); //add all the fields in Product Section of Groups to the db |
243 | 243 | $group_fields = $this->groups->where('list_id', $this->list_id) |
244 | - ->select('category_name', 'category_option_id', 'category_id')->get()->toArray(); |
|
244 | + ->select('category_name', 'category_option_id', 'category_id')->get()->toArray(); |
|
245 | 245 | // dd($group_fields[0]); |
246 | 246 | $relations = MailchimpGroupAgoraRelation::where('id', '!=', 0) |
247 | - ->select('agora_product_id', 'mailchimp_group_cat_id') |
|
248 | - ->orderBy('id', 'asc')->get()->toArray(); |
|
247 | + ->select('agora_product_id', 'mailchimp_group_cat_id') |
|
248 | + ->orderBy('id', 'asc')->get()->toArray(); |
|
249 | 249 | $productList = []; |
250 | 250 | $categoryList = []; |
251 | 251 | if (count($relations) != 0) { |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | MailchimpGroupAgoraRelation::where('id', '!=', 0)->delete(); |
325 | 325 | foreach ($request->row as $key => $value) { |
326 | 326 | MailchimpGroupAgoraRelation::create(['agora_product_id'=> $value[0], |
327 | - 'mailchimp_group_cat_id' => $value[1], ]); |
|
327 | + 'mailchimp_group_cat_id' => $value[1], ]); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | return redirect()->back()->with('success', \Lang::get('message.updated-successfully')); |
@@ -135,18 +135,21 @@ |
||
135 | 135 | if ($this->checkPlanSession() === true) { |
136 | 136 | $planid = Session::get('plan'); |
137 | 137 | } |
138 | - if (!$planid) {//When Product Is Added from Cart |
|
138 | + if (!$planid) { |
|
139 | +//When Product Is Added from Cart |
|
139 | 140 | $planid = Plan::where('product', $productid)->pluck('id')->first(); |
140 | 141 | } |
141 | 142 | $plan = Plan::where('id', $planid)->where('product', $productid)->first(); |
142 | - if ($plan) { //Get the Total Plan Cost if the Plan Exists For a Product |
|
143 | + if ($plan) { |
|
144 | +//Get the Total Plan Cost if the Plan Exists For a Product |
|
143 | 145 | $months = 1; |
144 | 146 | $cont = new CartController(); |
145 | 147 | $currency = $cont->currency($userid); |
146 | 148 | $product = Product::find($productid); |
147 | 149 | $days = $plan->periods->pluck('days')->first(); |
148 | 150 | $price = ($product->planRelation->find($planid)->planPrice->where('currency', $currency['currency'])->first()->add_price); |
149 | - if ($days) { //If Period Is defined for a Particular Plan ie no. of Days Generated |
|
151 | + if ($days) { |
|
152 | +//If Period Is defined for a Particular Plan ie no. of Days Generated |
|
150 | 153 | $months = $days >= '365' ? $days / 30 / 12 : $days / 30; |
151 | 154 | } |
152 | 155 | $finalPrice = str_replace(',', '', $price); |
@@ -150,36 +150,36 @@ |
||
150 | 150 | return $url; |
151 | 151 | }) |
152 | 152 | |
153 | - ->filterColumn('created_at', function ($query, $keyword) { |
|
154 | - $sql = 'created_at like ?'; |
|
155 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
156 | - }) |
|
157 | - |
|
158 | - ->filterColumn('client', function ($query, $keyword) { |
|
159 | - $sql = 'client like ?'; |
|
160 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
161 | - }) |
|
162 | - |
|
163 | - ->filterColumn('number', function ($query, $keyword) { |
|
164 | - $sql = 'number like ?'; |
|
165 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
166 | - }) |
|
153 | + ->filterColumn('created_at', function ($query, $keyword) { |
|
154 | + $sql = 'created_at like ?'; |
|
155 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
156 | + }) |
|
157 | + |
|
158 | + ->filterColumn('client', function ($query, $keyword) { |
|
159 | + $sql = 'client like ?'; |
|
160 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
161 | + }) |
|
162 | + |
|
163 | + ->filterColumn('number', function ($query, $keyword) { |
|
164 | + $sql = 'number like ?'; |
|
165 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
166 | + }) |
|
167 | 167 | ->filterColumn('price_override', function ($query, $keyword) { |
168 | 168 | $sql = 'price_override like ?'; |
169 | 169 | $query->whereRaw($sql, ["%{$keyword}%"]); |
170 | 170 | }) |
171 | - ->filterColumn('order_status', function ($query, $keyword) { |
|
172 | - $sql = 'order_status like ?'; |
|
173 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
174 | - }) |
|
175 | - |
|
176 | - ->filterColumn('update_ends_at', function ($query, $keyword) { |
|
177 | - $sql = 'update_ends_at like ?'; |
|
178 | - $query->whereRaw($sql, ["%{$keyword}%"]); |
|
179 | - }) |
|
180 | - |
|
181 | - ->rawColumns(['checkbox', 'date', 'client', 'number', |
|
182 | - 'price_override', 'order_status', 'productname', 'update_ends_at', 'action', ]) |
|
171 | + ->filterColumn('order_status', function ($query, $keyword) { |
|
172 | + $sql = 'order_status like ?'; |
|
173 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
174 | + }) |
|
175 | + |
|
176 | + ->filterColumn('update_ends_at', function ($query, $keyword) { |
|
177 | + $sql = 'update_ends_at like ?'; |
|
178 | + $query->whereRaw($sql, ["%{$keyword}%"]); |
|
179 | + }) |
|
180 | + |
|
181 | + ->rawColumns(['checkbox', 'date', 'client', 'number', |
|
182 | + 'price_override', 'order_status', 'productname', 'update_ends_at', 'action', ]) |
|
183 | 183 | ->make(true); |
184 | 184 | } |
185 | 185 |
@@ -105,16 +105,16 @@ discard block |
||
105 | 105 | |
106 | 106 | return \DataTables::of($query->take(50)) |
107 | 107 | ->setTotalRecords($query->count()) |
108 | - ->addColumn('checkbox', function ($model) { |
|
108 | + ->addColumn('checkbox', function($model) { |
|
109 | 109 | return "<input type='checkbox' class='order_checkbox' value=". |
110 | 110 | $model->id.' name=select[] id=check>'; |
111 | 111 | }) |
112 | - ->addColumn('date', function ($model) { |
|
112 | + ->addColumn('date', function($model) { |
|
113 | 113 | $date = $model->created_at; |
114 | 114 | |
115 | 115 | return "<span style='display:none'>$model->id</span>".$date; |
116 | 116 | }) |
117 | - ->addColumn('client', function ($model) { |
|
117 | + ->addColumn('client', function($model) { |
|
118 | 118 | $user = $this->user->where('id', $model->client)->first(); |
119 | 119 | $first = $user->first_name; |
120 | 120 | $last = $user->last_name; |
@@ -122,30 +122,30 @@ discard block |
||
122 | 122 | |
123 | 123 | return '<a href='.url('clients/'.$id).'>'.ucfirst($first).' '.ucfirst($last).'<a>'; |
124 | 124 | }) |
125 | - ->addColumn('productname', function ($model) { |
|
125 | + ->addColumn('productname', function($model) { |
|
126 | 126 | $productid = ($model->product); |
127 | 127 | $productName = Product::where('id', $productid)->pluck('name')->first(); |
128 | 128 | |
129 | 129 | return $productName; |
130 | 130 | }) |
131 | - ->addColumn('number', function ($model) { |
|
131 | + ->addColumn('number', function($model) { |
|
132 | 132 | return ucfirst($model->number); |
133 | 133 | }) |
134 | - ->addColumn('price_override', function ($model) { |
|
134 | + ->addColumn('price_override', function($model) { |
|
135 | 135 | $currency = $model->user()->find($model->client)->currency; |
136 | 136 | |
137 | 137 | return currency_format($model->price_override, $code = $currency); |
138 | 138 | }) |
139 | - ->addColumn('order_status', function ($model) { |
|
139 | + ->addColumn('order_status', function($model) { |
|
140 | 140 | return ucfirst($model->order_status); |
141 | 141 | }) |
142 | 142 | // ->showColumns('number', 'price_override', 'order_status') |
143 | - ->addColumn('update_ends_at', function ($model) { |
|
143 | + ->addColumn('update_ends_at', function($model) { |
|
144 | 144 | $end = $this->getEndDate($model); |
145 | 145 | |
146 | 146 | return $end; |
147 | 147 | }) |
148 | - ->addColumn('action', function ($model) { |
|
148 | + ->addColumn('action', function($model) { |
|
149 | 149 | $sub = $model->subscription()->first(); |
150 | 150 | $status = $this->checkInvoiceStatusByOrderId($model->id); |
151 | 151 | $url = $this->getUrl($model, $status, $sub); |
@@ -153,30 +153,30 @@ discard block |
||
153 | 153 | return $url; |
154 | 154 | }) |
155 | 155 | |
156 | - ->filterColumn('created_at', function ($query, $keyword) { |
|
156 | + ->filterColumn('created_at', function($query, $keyword) { |
|
157 | 157 | $sql = 'created_at like ?'; |
158 | 158 | $query->whereRaw($sql, ["%{$keyword}%"]); |
159 | 159 | }) |
160 | 160 | |
161 | - ->filterColumn('client', function ($query, $keyword) { |
|
161 | + ->filterColumn('client', function($query, $keyword) { |
|
162 | 162 | $sql = 'client like ?'; |
163 | 163 | $query->whereRaw($sql, ["%{$keyword}%"]); |
164 | 164 | }) |
165 | 165 | |
166 | - ->filterColumn('number', function ($query, $keyword) { |
|
166 | + ->filterColumn('number', function($query, $keyword) { |
|
167 | 167 | $sql = 'number like ?'; |
168 | 168 | $query->whereRaw($sql, ["%{$keyword}%"]); |
169 | 169 | }) |
170 | - ->filterColumn('price_override', function ($query, $keyword) { |
|
170 | + ->filterColumn('price_override', function($query, $keyword) { |
|
171 | 171 | $sql = 'price_override like ?'; |
172 | 172 | $query->whereRaw($sql, ["%{$keyword}%"]); |
173 | 173 | }) |
174 | - ->filterColumn('order_status', function ($query, $keyword) { |
|
174 | + ->filterColumn('order_status', function($query, $keyword) { |
|
175 | 175 | $sql = 'order_status like ?'; |
176 | 176 | $query->whereRaw($sql, ["%{$keyword}%"]); |
177 | 177 | }) |
178 | 178 | |
179 | - ->filterColumn('update_ends_at', function ($query, $keyword) { |
|
179 | + ->filterColumn('update_ends_at', function($query, $keyword) { |
|
180 | 180 | $sql = 'update_ends_at like ?'; |
181 | 181 | $query->whereRaw($sql, ["%{$keyword}%"]); |
182 | 182 | }) |
@@ -52,10 +52,10 @@ discard block |
||
52 | 52 | return\ DataTables::of($product_group) |
53 | 53 | // return \Datatable::of($this->group->select('id', 'name')->get()) |
54 | 54 | |
55 | - ->addColumn('checkbox', function ($model) { |
|
56 | - return "<input type='checkbox' class='group_checkbox' |
|
55 | + ->addColumn('checkbox', function ($model) { |
|
56 | + return "<input type='checkbox' class='group_checkbox' |
|
57 | 57 | value=".$model->id.' name=select[] id=check>'; |
58 | - }) |
|
58 | + }) |
|
59 | 59 | |
60 | 60 | ->addColumn('name', function ($model) { |
61 | 61 | return ucfirst($model->name); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | 'pricing_templates_id' => 'required', |
102 | 102 | ], [ |
103 | 103 | 'pricing_templates_id.required'=> 'Please Select a Template', |
104 | - ]); |
|
104 | + ]); |
|
105 | 105 | |
106 | 106 | try { |
107 | 107 | $this->group->fill($request->input())->save(); |
@@ -52,22 +52,22 @@ |
||
52 | 52 | return\ DataTables::of($product_group) |
53 | 53 | // return \Datatable::of($this->group->select('id', 'name')->get()) |
54 | 54 | |
55 | - ->addColumn('checkbox', function ($model) { |
|
55 | + ->addColumn('checkbox', function($model) { |
|
56 | 56 | return "<input type='checkbox' class='group_checkbox' |
57 | 57 | value=".$model->id.' name=select[] id=check>'; |
58 | 58 | }) |
59 | 59 | |
60 | - ->addColumn('name', function ($model) { |
|
60 | + ->addColumn('name', function($model) { |
|
61 | 61 | return ucfirst($model->name); |
62 | 62 | }) |
63 | 63 | // ->showColumns('name') |
64 | 64 | |
65 | - ->addColumn('action', function ($model) { |
|
65 | + ->addColumn('action', function($model) { |
|
66 | 66 | return '<a href='.url('groups/'.$model->id.'/edit'). |
67 | 67 | " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit' |
68 | 68 | style='color:white;'> </i> Edit</a>"; |
69 | 69 | }) |
70 | - ->rawColumns(['checkbox', 'name', 'action']) |
|
70 | + ->rawColumns(['checkbox', 'name', 'action']) |
|
71 | 71 | ->make(true); |
72 | 72 | } |
73 | 73 |
@@ -146,7 +146,7 @@ |
||
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(); |
@@ -95,7 +95,7 @@ discard block |
||
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 |
||
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; |
@@ -17,9 +17,9 @@ discard block |
||
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 |
||
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' => [ |
@@ -45,10 +45,10 @@ |
||
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', |