Completed
Push — development ( b504d8...633085 )
by Ashutosh
10:54 queued 10s
created
app/Http/Controllers/Auth/AuthController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
                     $response = curl_exec($ch);
94 94
                     curl_close($ch);
95 95
                 }
96
-                if($mailchimpStatus ==1) {
96
+                if ($mailchimpStatus == 1) {
97 97
                     $mailchimp = new \App\Http\Controllers\Common\MailChimpController();
98 98
                     $r = $mailchimp->addSubscriber($user->email);
99 99
                 }
Please login to merge, or discard this patch.
app/Http/Controllers/User/ClientController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -116,18 +116,18 @@  discard block
 block discarded – undo
116 116
         );
117 117
 
118 118
         return\ DataTables::of($user->get())
119
-                         ->addColumn('checkbox', function ($model) {
119
+                         ->addColumn('checkbox', function($model) {
120 120
                              return "<input type='checkbox' class='user_checkbox' 
121 121
                             value=".$model->id.' name=select[] id=check>';
122 122
                          })
123
-                        ->addColumn('first_name', function ($model) {
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) {
127
+                         ->addColumn('email', function($model) {
128 128
                              return $model->email;
129 129
                          })
130
-                          ->addColumn('created_at', function ($model) {
130
+                          ->addColumn('created_at', function($model) {
131 131
                               $ends = $model->created_at;
132 132
                               if ($ends) {
133 133
                                   $date1 = new DateTime($ends);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                               return $end;
140 140
                           })
141 141
                         // ->showColumns('email', 'created_at')
142
-                        ->addColumn('active', function ($model) {
142
+                        ->addColumn('active', function($model) {
143 143
                             if ($model->active == 1) {
144 144
                                 $email = "<span class='glyphicon glyphicon-envelope'
145 145
                                  style='color:green' title='verified email'></span>";
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
                             return $email.'&nbsp;&nbsp;'.$mobile;
159 159
                         })
160
-                        ->addColumn('action', function ($model) {
160
+                        ->addColumn('action', function($model) {
161 161
                             return '<a href='.url('clients/'.$model->id.'/edit')
162 162
                             ." class='btn btn-sm btn-primary btn-xs'>
163 163
                             <i class='fa fa-edit' style='color:white;'> </i>&nbsp;&nbsp;Edit</a>"
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                                     <i class='fa fa-eye' style='color:white;'> </i>&nbsp;&nbsp;View</a>";
167 167
                             // return 'hhhh';
168 168
                         })
169
-                        ->rawColumns(['checkbox', 'first_name', 'email',  'created_at', 'active', 'action'])
169
+                        ->rawColumns(['checkbox', 'first_name', 'email', 'created_at', 'active', 'action'])
170 170
                         ->make(true);
171 171
 
172 172
         // ->searchColumns('email', 'first_name')
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             $user->fill($request->input())->save();
221 221
             $this->sendWelcomeMail($user);
222 222
             $mailchimpStatus = StatusSetting::first()->value('mailchimp_status');
223
-            if($mailchimpStatus ==1) {
223
+            if ($mailchimpStatus == 1) {
224 224
             $mailchimp = new \App\Http\Controllers\Common\MailChimpController();
225 225
             $r = $mailchimp->addSubscriber($user->email);
226 226
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/BaseMailChimpController.php 3 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -42,24 +42,24 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Http/Controllers/Order/BaseOrderController.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
             $this->addSubscription($order->id, $plan_id, $version, $product, $serial_key);
110 110
             $this->sendOrderMail($user_id, $order->id, $item->id);
111 111
             //Update Subscriber To Mailchimp
112
-             $mailchimpStatus = StatusSetting::first()->value('mailchimp_status');
113
-              if($mailchimpStatus == 1) {
112
+                $mailchimpStatus = StatusSetting::first()->value('mailchimp_status');
113
+                if($mailchimpStatus == 1) {
114 114
             $mailchimp = new \App\Http\Controllers\Common\MailChimpController();
115 115
             $email = User::where('id', $user_id)->pluck('email')->first();
116 116
             if ($item->subtotal > 0) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         } else {
119 119
             $r = $mailchimp->updateSubscriberForFreeProduct($email, $product);
120 120
         }
121
-      }
121
+        }
122 122
         } catch (\Exception $ex) {
123 123
             Bugsnag::notifyException($ex);
124 124
             app('log')->error($ex->getMessage());
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $data = $template->data;
279 279
         $replace = [
280 280
             'name'          => $user->first_name.' '.$user->last_name,
281
-             'serialkeyurl' => $myaccounturl,
281
+                'serialkeyurl' => $myaccounturl,
282 282
             'downloadurl'   => $downloadurl,
283 283
             'invoiceurl'    => $invoiceurl,
284 284
             'product'       => $product,
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
             $this->sendOrderMail($user_id, $order->id, $item->id);
111 111
             //Update Subscriber To Mailchimp
112 112
              $mailchimpStatus = StatusSetting::first()->value('mailchimp_status');
113
-              if($mailchimpStatus == 1) {
113
+              if ($mailchimpStatus == 1) {
114 114
             $mailchimp = new \App\Http\Controllers\Common\MailChimpController();
115 115
             $email = User::where('id', $user_id)->pluck('email')->first();
116 116
             if ($item->subtotal > 0) {
Please login to merge, or discard this patch.
app/Http/Controllers/Front/CheckoutController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -274,7 +274,7 @@
 block discarded – undo
274 274
                 $check_product_category = $this->product($invoiceid);
275 275
                 //Update Subscriber To Mailchimp
276 276
                 $mailchimpStatus = StatusSetting::first()->value('mailchimp_status');
277
-                if( $mailchimpStatus == 1) {
277
+                if ($mailchimpStatus == 1) {
278 278
                     $mailchimp = new \App\Http\Controllers\Common\MailChimpController();
279 279
                     $r = $mailchimp->updateSubscriberForFreeProduct(\Auth::user()->email, $check_product_category->id);
280 280
                 }
Please login to merge, or discard this patch.