@@ -45,24 +45,24 @@ discard block |
||
| 45 | 45 | return $model->name; |
| 46 | 46 | }) |
| 47 | 47 | |
| 48 | - ->addColumn('code', function ($model) { |
|
| 49 | - return $model->code; |
|
| 50 | - }) |
|
| 48 | + ->addColumn('code', function ($model) { |
|
| 49 | + return $model->code; |
|
| 50 | + }) |
|
| 51 | 51 | |
| 52 | - ->addColumn('symbol', function ($model) { |
|
| 53 | - return $model->symbol; |
|
| 54 | - }) |
|
| 52 | + ->addColumn('symbol', function ($model) { |
|
| 53 | + return $model->symbol; |
|
| 54 | + }) |
|
| 55 | 55 | |
| 56 | - ->addColumn('dashboard', function ($model) { |
|
| 57 | - if ($model->status == 1) { |
|
| 58 | - $showButton = $this->getButtonColor($model->id); |
|
| 56 | + ->addColumn('dashboard', function ($model) { |
|
| 57 | + if ($model->status == 1) { |
|
| 58 | + $showButton = $this->getButtonColor($model->id); |
|
| 59 | 59 | |
| 60 | - return $showButton; |
|
| 61 | - } else { |
|
| 62 | - return '<a class="btn btn-sm btn-primary btn-xs disabled"><i class="fa fa-eye" |
|
| 60 | + return $showButton; |
|
| 61 | + } else { |
|
| 62 | + return '<a class="btn btn-sm btn-primary btn-xs disabled"><i class="fa fa-eye" |
|
| 63 | 63 | style="color:white;"> </i> Show on Dashboard</a>'; |
| 64 | - } |
|
| 65 | - }) |
|
| 64 | + } |
|
| 65 | + }) |
|
| 66 | 66 | |
| 67 | 67 | ->addColumn('status', function ($model) { |
| 68 | 68 | if ($model->status == 1) { |
@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | { |
| 288 | 288 | $countryDetails = Country::where('country_id', $request->id)->select('currency_code', 'currency_symbol', 'currency_name')->first(); |
| 289 | 289 | $data = (['code'=> $countryDetails->currency_code, |
| 290 | - 'symbol' => $countryDetails->currency_symbol, 'currency'=>$countryDetails->currency_name, ]); |
|
| 290 | + 'symbol' => $countryDetails->currency_symbol, 'currency'=>$countryDetails->currency_name, ]); |
|
| 291 | 291 | |
| 292 | 292 | return $data; |
| 293 | 293 | } |
@@ -41,19 +41,19 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | return \DataTables::of($model) |
| 43 | 43 | |
| 44 | - ->addColumn('name', function ($model) { |
|
| 44 | + ->addColumn('name', function($model) { |
|
| 45 | 45 | return $model->name; |
| 46 | 46 | }) |
| 47 | 47 | |
| 48 | - ->addColumn('code', function ($model) { |
|
| 48 | + ->addColumn('code', function($model) { |
|
| 49 | 49 | return $model->code; |
| 50 | 50 | }) |
| 51 | 51 | |
| 52 | - ->addColumn('symbol', function ($model) { |
|
| 52 | + ->addColumn('symbol', function($model) { |
|
| 53 | 53 | return $model->symbol; |
| 54 | 54 | }) |
| 55 | 55 | |
| 56 | - ->addColumn('dashboard', function ($model) { |
|
| 56 | + ->addColumn('dashboard', function($model) { |
|
| 57 | 57 | if ($model->status == 1) { |
| 58 | 58 | $showButton = $this->getButtonColor($model->id); |
| 59 | 59 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | }) |
| 66 | 66 | |
| 67 | - ->addColumn('status', function ($model) { |
|
| 67 | + ->addColumn('status', function($model) { |
|
| 68 | 68 | if ($model->status == 1) { |
| 69 | 69 | return'<label class="switch toggle_event_editing"> |
| 70 | 70 | <input type="hidden" name="module_id" class="module_id" value="'.$model->id.'" > |
@@ -279,7 +279,7 @@ |
||
| 279 | 279 | StatusSetting::find(1)->update(['github_status'=>$status]); |
| 280 | 280 | Github::find(1)->update(['username'=> $request->input('git_username'), |
| 281 | 281 | 'password' => $request->input('git_password'), 'client_id'=>$request->input('git_client'), |
| 282 | - 'client_secret' => $request->input('git_secret'), ]); |
|
| 282 | + 'client_secret' => $request->input('git_secret'), ]); |
|
| 283 | 283 | |
| 284 | 284 | return ['message' => 'success', 'update'=>'Github Settings Updated']; |
| 285 | 285 | } catch (Exception $ex) { |
@@ -115,28 +115,28 @@ discard block |
||
| 115 | 115 | ); |
| 116 | 116 | |
| 117 | 117 | return\ DataTables::of($user->get()) |
| 118 | - ->addColumn('checkbox', function ($model) { |
|
| 119 | - return "<input type='checkbox' class='user_checkbox' |
|
| 118 | + ->addColumn('checkbox', function ($model) { |
|
| 119 | + return "<input type='checkbox' class='user_checkbox' |
|
| 120 | 120 | value=".$model->id.' name=select[] id=check>'; |
| 121 | - }) |
|
| 121 | + }) |
|
| 122 | 122 | ->addColumn('first_name', function ($model) { |
| 123 | 123 | return '<a href='.url('clients/'.$model->id).'>' |
| 124 | 124 | .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>'; |
| 125 | 125 | }) |
| 126 | - ->addColumn('email', function ($model) { |
|
| 127 | - return $model->email; |
|
| 128 | - }) |
|
| 129 | - ->addColumn('created_at', function ($model) { |
|
| 130 | - $ends = $model->created_at; |
|
| 131 | - if ($ends) { |
|
| 132 | - $date1 = new DateTime($ends); |
|
| 133 | - $tz = \Auth::user()->timezone()->first()->name; |
|
| 134 | - $date1->setTimezone(new DateTimeZone($tz)); |
|
| 135 | - $end = $date1->format('M j, Y, g:i a '); |
|
| 136 | - } |
|
| 137 | - |
|
| 138 | - return $end; |
|
| 139 | - }) |
|
| 126 | + ->addColumn('email', function ($model) { |
|
| 127 | + return $model->email; |
|
| 128 | + }) |
|
| 129 | + ->addColumn('created_at', function ($model) { |
|
| 130 | + $ends = $model->created_at; |
|
| 131 | + if ($ends) { |
|
| 132 | + $date1 = new DateTime($ends); |
|
| 133 | + $tz = \Auth::user()->timezone()->first()->name; |
|
| 134 | + $date1->setTimezone(new DateTimeZone($tz)); |
|
| 135 | + $end = $date1->format('M j, Y, g:i a '); |
|
| 136 | + } |
|
| 137 | + |
|
| 138 | + return $end; |
|
| 139 | + }) |
|
| 140 | 140 | // ->showColumns('email', 'created_at') |
| 141 | 141 | ->addColumn('active', function ($model) { |
| 142 | 142 | if ($model->active == 1) { |
@@ -553,9 +553,9 @@ discard block |
||
| 553 | 553 | return \Response::json([]); |
| 554 | 554 | } |
| 555 | 555 | $users = User::where('email', 'LIKE', '%'.$term.'%') |
| 556 | - ->orWhere('first_name', 'LIKE', '%'.$term.'%') |
|
| 557 | - ->orWhere('last_name', 'LIKE', '%'.$term.'%') |
|
| 558 | - ->select('id', 'email', 'profile_pic', 'first_name', 'last_name')->get(); |
|
| 556 | + ->orWhere('first_name', 'LIKE', '%'.$term.'%') |
|
| 557 | + ->orWhere('last_name', 'LIKE', '%'.$term.'%') |
|
| 558 | + ->select('id', 'email', 'profile_pic', 'first_name', 'last_name')->get(); |
|
| 559 | 559 | $formatted_tags = []; |
| 560 | 560 | |
| 561 | 561 | foreach ($users as $user) { |
@@ -115,18 +115,18 @@ discard block |
||
| 115 | 115 | ); |
| 116 | 116 | |
| 117 | 117 | return\ DataTables::of($user->get()) |
| 118 | - ->addColumn('checkbox', function ($model) { |
|
| 118 | + ->addColumn('checkbox', function($model) { |
|
| 119 | 119 | return "<input type='checkbox' class='user_checkbox' |
| 120 | 120 | value=".$model->id.' name=select[] id=check>'; |
| 121 | 121 | }) |
| 122 | - ->addColumn('first_name', function ($model) { |
|
| 122 | + ->addColumn('first_name', function($model) { |
|
| 123 | 123 | return '<a href='.url('clients/'.$model->id).'>' |
| 124 | 124 | .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>'; |
| 125 | 125 | }) |
| 126 | - ->addColumn('email', function ($model) { |
|
| 126 | + ->addColumn('email', function($model) { |
|
| 127 | 127 | return $model->email; |
| 128 | 128 | }) |
| 129 | - ->addColumn('created_at', function ($model) { |
|
| 129 | + ->addColumn('created_at', function($model) { |
|
| 130 | 130 | $ends = $model->created_at; |
| 131 | 131 | if ($ends) { |
| 132 | 132 | $date1 = new DateTime($ends); |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | return $end; |
| 139 | 139 | }) |
| 140 | 140 | // ->showColumns('email', 'created_at') |
| 141 | - ->addColumn('active', function ($model) { |
|
| 141 | + ->addColumn('active', function($model) { |
|
| 142 | 142 | if ($model->active == 1) { |
| 143 | 143 | $email = "<span class='glyphicon glyphicon-envelope' |
| 144 | 144 | style='color:green' title='verified email'></span>"; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | return $email.' '.$mobile; |
| 158 | 158 | }) |
| 159 | - ->addColumn('action', function ($model) { |
|
| 159 | + ->addColumn('action', function($model) { |
|
| 160 | 160 | return '<a href='.url('clients/'.$model->id.'/edit') |
| 161 | 161 | ." class='btn btn-sm btn-primary btn-xs'> |
| 162 | 162 | <i class='fa fa-edit' style='color:white;'> </i> Edit</a>" |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | <i class='fa fa-eye' style='color:white;'> </i> View</a>"; |
| 166 | 166 | // return 'hhhh'; |
| 167 | 167 | }) |
| 168 | - ->rawColumns(['checkbox', 'first_name', 'email', 'created_at', 'active', 'action']) |
|
| 168 | + ->rawColumns(['checkbox', 'first_name', 'email', 'created_at', 'active', 'action']) |
|
| 169 | 169 | ->make(true); |
| 170 | 170 | |
| 171 | 171 | // ->searchColumns('email', 'first_name') |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | class BaseMailChimpController extends Controller |
| 10 | 10 | { |
| 11 | - public function getLists() |
|
| 11 | + public function getLists() |
|
| 12 | 12 | { |
| 13 | 13 | try { |
| 14 | 14 | $result = $this->mailchimp->request('lists'); |
@@ -51,17 +51,17 @@ discard block |
||
| 51 | 51 | ->pluck('mailchimp_group_cat_id')->first(); |
| 52 | 52 | } |
| 53 | 53 | if ($interestGroupIdForNo && $productGroupId) { |
| 54 | - $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 55 | - 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true], |
|
| 56 | - //refer to https://us7.api.mailchimp.com/playground |
|
| 57 | - ]); |
|
| 54 | + $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 55 | + 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true], |
|
| 56 | + //refer to https://us7.api.mailchimp.com/playground |
|
| 57 | + ]); |
|
| 58 | 58 | } elseif ($interestGroupIdForNo && $productGroupId ==null) { |
| 59 | - $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 60 | - 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false], |
|
| 61 | - //refer to https://us7.api.mailchimp.com/playground |
|
| 59 | + $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 60 | + 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false], |
|
| 61 | + //refer to https://us7.api.mailchimp.com/playground |
|
| 62 | 62 | } elseif ($productGroupId && $interestGroupIdForNo==null || $interestGroupIdForYes==null) { |
| 63 | - $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 64 | - 'interests' => [$productGroupId =>true], |
|
| 63 | + $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 64 | + 'interests' => [$productGroupId =>true], |
|
| 65 | 65 | } |
| 66 | 66 | } catch (Exception $ex) { |
| 67 | 67 | $exe = json_decode($ex->getMessage(), true); |
@@ -72,9 +72,9 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | try { |
| 74 | 74 | $merge_fields = $this->field($email); |
| 75 | - $hash = md5($email); |
|
| 76 | - $isPaidStatus = StatusSetting::select()->value('mailchimp_ispaid_status'); |
|
| 77 | - $productStatusStatus = StatusSetting::select()->value('mailchimp_product_status'); |
|
| 75 | + $hash = md5($email); |
|
| 76 | + $isPaidStatus = StatusSetting::select()->value('mailchimp_ispaid_status'); |
|
| 77 | + $productStatusStatus = StatusSetting::select()->value('mailchimp_product_status'); |
|
| 78 | 78 | if ($isPaidStatus ==1) { |
| 79 | 79 | $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No |
| 80 | 80 | $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes |
@@ -84,20 +84,20 @@ discard block |
||
| 84 | 84 | ->pluck('mailchimp_group_cat_id')->first(); |
| 85 | 85 | } |
| 86 | 86 | if ($interestGroupIdForNo && $productGroupId) { |
| 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 | - ]); |
|
| 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 | + ]); |
|
| 91 | 91 | } elseif ($interestGroupIdForNo && $productGroupId ==null) { |
| 92 | - $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 93 | - 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true], |
|
| 94 | - //refer to https://us7.api.mailchimp.com/playground |
|
| 92 | + $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 93 | + 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true], |
|
| 94 | + //refer to https://us7.api.mailchimp.com/playground |
|
| 95 | 95 | } elseif ($productGroupId && $interestGroupIdForNo==null || $interestGroupIdForYes==null) { |
| 96 | - $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 97 | - 'interests' => [$productGroupId =>true], |
|
| 96 | + $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
|
| 97 | + 'interests' => [$productGroupId =>true], |
|
| 98 | 98 | } |
| 99 | - //refer to https://us7.api.mailchimp.com/playground |
|
| 100 | - ]); |
|
| 99 | + //refer to https://us7.api.mailchimp.com/playground |
|
| 100 | + ]); |
|
| 101 | 101 | } catch (Exception $ex) { |
| 102 | 102 | $exe = json_decode($ex->getMessage(), true); |
| 103 | 103 | } |
@@ -42,24 +42,24 @@ discard block |
||
| 42 | 42 | $hash = md5($email); |
| 43 | 43 | $isPaidStatus = StatusSetting::select()->value('mailchimp_ispaid_status'); |
| 44 | 44 | $productStatusStatus = StatusSetting::select()->value('mailchimp_product_status'); |
| 45 | - if ($isPaidStatus ==1) { |
|
| 45 | + if ($isPaidStatus == 1) { |
|
| 46 | 46 | $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No |
| 47 | 47 | $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes |
| 48 | 48 | } |
| 49 | - if ($productStatusStatus ==1) { |
|
| 49 | + if ($productStatusStatus == 1) { |
|
| 50 | 50 | $productGroupId = $this->groupRelation->where('agora_product_id', $productid) |
| 51 | 51 | ->pluck('mailchimp_group_cat_id')->first(); |
| 52 | 52 | } |
| 53 | - if ($interestGroupIdForNo && $productGroupId) { |
|
| 53 | + if ($interestGroupIdForNo && $productGroupId) { |
|
| 54 | 54 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
| 55 | 55 | 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true], |
| 56 | 56 | //refer to https://us7.api.mailchimp.com/playground |
| 57 | 57 | ]); |
| 58 | - } elseif ($interestGroupIdForNo && $productGroupId ==null) { |
|
| 58 | + } elseif ($interestGroupIdForNo && $productGroupId == null) { |
|
| 59 | 59 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
| 60 | 60 | 'interests' => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false], |
| 61 | 61 | //refer to https://us7.api.mailchimp.com/playground |
| 62 | - } elseif ($productGroupId && $interestGroupIdForNo==null || $interestGroupIdForYes==null) { |
|
| 62 | + } elseif ($productGroupId && $interestGroupIdForNo == null || $interestGroupIdForYes == null) { |
|
| 63 | 63 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
| 64 | 64 | 'interests' => [$productGroupId =>true], |
| 65 | 65 | } |
@@ -75,11 +75,11 @@ discard block |
||
| 75 | 75 | $hash = md5($email); |
| 76 | 76 | $isPaidStatus = StatusSetting::select()->value('mailchimp_ispaid_status'); |
| 77 | 77 | $productStatusStatus = StatusSetting::select()->value('mailchimp_product_status'); |
| 78 | - if ($isPaidStatus ==1) { |
|
| 78 | + if ($isPaidStatus == 1) { |
|
| 79 | 79 | $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No |
| 80 | 80 | $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes |
| 81 | 81 | } |
| 82 | - if ($productStatusStatus ==1) { |
|
| 82 | + if ($productStatusStatus == 1) { |
|
| 83 | 83 | $productGroupId = $this->groupRelation->where('agora_product_id', $productid) |
| 84 | 84 | ->pluck('mailchimp_group_cat_id')->first(); |
| 85 | 85 | } |
@@ -88,11 +88,11 @@ discard block |
||
| 88 | 88 | 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true, $productGroupId =>true], |
| 89 | 89 | //refer to https://us7.api.mailchimp.com/playground |
| 90 | 90 | ]); |
| 91 | - } elseif ($interestGroupIdForNo && $productGroupId ==null) { |
|
| 91 | + } elseif ($interestGroupIdForNo && $productGroupId == null) { |
|
| 92 | 92 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
| 93 | 93 | 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true], |
| 94 | 94 | //refer to https://us7.api.mailchimp.com/playground |
| 95 | - } elseif ($productGroupId && $interestGroupIdForNo==null || $interestGroupIdForYes==null) { |
|
| 95 | + } elseif ($productGroupId && $interestGroupIdForNo == null || $interestGroupIdForYes == null) { |
|
| 96 | 96 | $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [ |
| 97 | 97 | 'interests' => [$productGroupId =>true], |
| 98 | 98 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | class BaseMailChimpController extends Controller |
| 10 | 10 | { |
| 11 | 11 | public function getLists() |
| 12 | - { |
|
| 12 | + { |
|
| 13 | 13 | try { |
| 14 | 14 | $result = $this->mailchimp->request('lists'); |
| 15 | 15 | |