Completed
Push — development ( 2b1a43...b28ccc )
by Ashutosh
11:47 queued 01:44
created
app/Traits/ApiKeySettings.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -119,16 +119,16 @@
 block discarded – undo
119 119
 
120 120
     public function updateMailchimpDetails(Request $request)
121 121
     {
122
-       $chimp_auth_key =  $request->input('mailchimp_auth_key');
123
-       $status =  $request->input('status');
124
-       StatusSetting::find(1)->update(['mailchimp_status'=>$status]);
125
-       MailchimpSetting::find(1)->update(['api_key'=>$chimp_auth_key]);
126
-       return ['message' => 'success', 'update'=>'Mailchimp Settings Updated'];
122
+        $chimp_auth_key =  $request->input('mailchimp_auth_key');
123
+        $status =  $request->input('status');
124
+        StatusSetting::find(1)->update(['mailchimp_status'=>$status]);
125
+        MailchimpSetting::find(1)->update(['api_key'=>$chimp_auth_key]);
126
+        return ['message' => 'success', 'update'=>'Mailchimp Settings Updated'];
127 127
     }
128 128
 
129
-     /**
130
-     * Get Date.
131
-     */
129
+        /**
130
+         * Get Date.
131
+         */
132 132
     public function getDate($dbdate)
133 133
     {
134 134
         $created = new DateTime($dbdate);
Please login to merge, or discard this patch.
app/Http/Controllers/Common/MailChimpController.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         try {
63 63
             $merge_fields = $this->field($email);
64 64
             $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No
65
-              $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
65
+                $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
66 66
             $result = $this->mailchimp->post("lists/$this->list_id/members", [
67 67
                 'status'        => $this->mailchimp_set->subscribe_status,
68 68
                 'email_address' => $email,
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
 
86 86
     //Update to Mailchimp For Paid Product
87
-     public function addSubscriberByClientPanel(Request $request)
87
+        public function addSubscriberByClientPanel(Request $request)
88 88
     {
89 89
         $this->validate($request, [
90 90
             'email' => 'required|email',
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             $country = Country::where('country_code_char2', $user->country)->pluck('nicename')->first();
121 121
             if ($user) {
122 122
                 $fields = ['first_name', 'last_name', 'company', 'mobile',
123
-                 'address', 'town', 'country', 'state', 'zip', 'active', 'role', 'source', ];
123
+                    'address', 'town', 'country', 'state', 'zip', 'active', 'role', 'source', ];
124 124
                 $relation = $this->relation;
125 125
                 $merge_fields = [];
126 126
                 foreach ($fields as $field) {
@@ -249,11 +249,11 @@  discard block
 block discarded – undo
249 249
 
250 250
             $this->addProductInterestFieldsToAgora(); //add all the fields in Product Section of Groups to the db
251 251
             $group_fields = $this->groups->where('list_id', $this->list_id)
252
-          ->select('category_name', 'category_option_id', 'category_id')->get()->toArray();
252
+            ->select('category_name', 'category_option_id', 'category_id')->get()->toArray();
253 253
             // dd($group_fields[0]);
254 254
             $relations = MailchimpGroupAgoraRelation::where('id', '!=', 0)
255
-          ->select('agora_product_id', 'mailchimp_group_cat_id')
256
-          ->orderBy('id', 'asc')->get()->toArray();
255
+            ->select('agora_product_id', 'mailchimp_group_cat_id')
256
+            ->orderBy('id', 'asc')->get()->toArray();
257 257
             $productList = [];
258 258
             $categoryList = [];
259 259
             if (count($relations) != 0) {
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
                     $productList[] = Product::where('id', $value['agora_product_id'])->pluck('name')->first();
263 263
                 }
264 264
             }
265
-           $isPaidYesId = MailchimpFieldAgoraRelation::first()->pluck('is_paid_yes')->toArray();
266
-           $selectedIsPaid[] =  $isPaidYesId ? MailchimpGroup::where('category_option_id',$isPaidYesId)->pluck('category_id')->first() :'';
265
+            $isPaidYesId = MailchimpFieldAgoraRelation::first()->pluck('is_paid_yes')->toArray();
266
+            $selectedIsPaid[] =  $isPaidYesId ? MailchimpGroup::where('category_option_id',$isPaidYesId)->pluck('category_id')->first() :'';
267 267
             $status = StatusSetting::select('mailchimp_product_status','mailchimp_ispaid_status')->first();
268 268
             return view('themes.default1.common.mailchimp.map', compact('mailchimp_fields', 'model2', 'model', 'agoraProducts', 'display', 'selectedProducts', 'relations', 'group_fields', 'categoryList', 'productList','status','selectedIsPaid'));
269 269
         } catch (Exception $ex) {
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             foreach ($fields as $field) {
287 287
                 $selectedCategory = MailchimpGroupAgoraRelation::where('mailchimp_group_cat_id', $field['category_option_id'])->pluck('mailchimp_group_cat_id')->first();
288 288
                 echo '<option value='.$field['category_option_id'].'>'.$field['category_option_name'].'</option>';
289
-           }
289
+            }
290 290
         }
291 291
 
292 292
     }
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
     if(count($checkCategory) > 0) {
298 298
         foreach ($checkCategory as $interest) {
299 299
         $groupInterests = $this->mailchimp->get("lists/$this->list_id/interest-categories/$interest->id/interests?count=20"); 
300
-          if (count($groupInterests['interests']) > 0) {
300
+            if (count($groupInterests['interests']) > 0) {
301 301
         foreach ($groupInterests['interests'] as $key => $value) {
302 302
                 $category_id = $value->category_id;
303 303
                 $list_id = $value->list_id;
@@ -310,11 +310,11 @@  discard block
 block discarded – undo
310 310
                 'category_name'      => $category_option_name,
311 311
             ]);
312 312
        
313
-         }
314
-       }
315
-     } 
313
+            }
314
+        }
315
+        } 
316
+    }
316 317
     }
317
-   }
318 318
 
319 319
 
320 320
     public function postMapField(Request $request)
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             MailchimpGroupAgoraRelation::where('id', '!=', 0)->delete();
335 335
             foreach ($request->row as $key => $value) {
336 336
                 MailchimpGroupAgoraRelation::create(['agora_product_id'=> $value[0],
337
-             'mailchimp_group_cat_id'                                  => $value[1], ]);
337
+                'mailchimp_group_cat_id'                                  => $value[1], ]);
338 338
             }
339 339
 
340 340
             return redirect()->back()->with('success', \Lang::get('message.updated-successfully'));
Please login to merge, or discard this patch.
app/Http/Controllers/Product/ProductController.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
                             ->addColumn('name', function ($model) {
121 121
                                 return ucfirst($model->name);
122 122
                             })
123
-                              ->addColumn('image', function ($model) {
124
-                                  // return $model->image;
125
-                                  return "<img src= '$model->image' + height=\"80\"/>";
126
-                              })
123
+                                ->addColumn('image', function ($model) {
124
+                                    // return $model->image;
125
+                                    return "<img src= '$model->image' + height=\"80\"/>";
126
+                                })
127 127
                             ->addColumn('type', function ($model) {
128 128
                                 if ($this->type->where('id', $model->type)->first()) {
129 129
                                     return $this->type->where('id', $model->type)->first()->name;
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
                             })
142 142
 
143 143
                             ->addColumn('Action', function ($model) {
144
-                               $permissions = LicensePermissionsController::getPermissionsForProduct($model->id);
145
-                               $url = '';
144
+                                $permissions = LicensePermissionsController::getPermissionsForProduct($model->id);
145
+                                $url = '';
146 146
                                 if ($permissions['downloadPermission'] == 1) {
147 147
                                     $url = '<a href='.url('product/download/'.$model->id).
148 148
                                     " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-download' 
Please login to merge, or discard this patch.