Completed
Branch feature-dynamic-fields (9e5831)
by Ashutosh
13:15
created
app/Model/Common/ChatScript.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         return '';
34 34
 
35 35
         // return "Product  has been {$eventName}";
36
-         // \Auth::user()->activity;
36
+            // \Auth::user()->activity;
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
app/Model/Product/ProductCategory.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         return '';
34 34
 
35 35
         // return "Product  has been {$eventName}";
36
-         // \Auth::user()->activity;
36
+            // \Auth::user()->activity;
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Http/Controllers/User/ClientController.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -78,31 +78,31 @@  discard block
 block discarded – undo
78 78
         $reg_from = $request->input('reg_from');
79 79
         $reg_till = $request->input('reg_till');
80 80
         $user = $this->advanceSearch($name, $username, $company,
81
-         $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position, $reg_from, $reg_till);
81
+            $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position, $reg_from, $reg_till);
82 82
 
83 83
         return\ DataTables::of($user->get())
84
-                         ->addColumn('checkbox', function ($model) {
85
-                             return "<input type='checkbox' class='user_checkbox' 
84
+                            ->addColumn('checkbox', function ($model) {
85
+                                return "<input type='checkbox' class='user_checkbox' 
86 86
                             value=".$model->id.' name=select[] id=check>';
87
-                         })
87
+                            })
88 88
                         ->addColumn('first_name', function ($model) {
89 89
                             return '<a href='.url('clients/'.$model->id).'>'
90 90
                             .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>';
91 91
                         })
92
-                         ->addColumn('email', function ($model) {
93
-                             return $model->email;
94
-                         })
95
-                          ->addColumn('created_at', function ($model) {
96
-                              $ends = $model->created_at;
97
-                              if ($ends) {
98
-                                  $date1 = new DateTime($ends);
99
-                                  $tz = \Auth::user()->timezone()->first()->name;
100
-                                  $date1->setTimezone(new DateTimeZone($tz));
101
-                                  $end = $date1->format('M j, Y, g:i a ');
102
-                              }
103
-
104
-                              return $end;
105
-                          })
92
+                            ->addColumn('email', function ($model) {
93
+                                return $model->email;
94
+                            })
95
+                            ->addColumn('created_at', function ($model) {
96
+                                $ends = $model->created_at;
97
+                                if ($ends) {
98
+                                    $date1 = new DateTime($ends);
99
+                                    $tz = \Auth::user()->timezone()->first()->name;
100
+                                    $date1->setTimezone(new DateTimeZone($tz));
101
+                                    $end = $date1->format('M j, Y, g:i a ');
102
+                                }
103
+
104
+                                return $end;
105
+                            })
106 106
                         // ->showColumns('email', 'created_at')
107 107
                         ->addColumn('active', function ($model) {
108 108
                             if ($model->active == 1) {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
             return view('themes.default1.user.client.show',
227 227
                 compact('id', 'client', 'invoices', 'model_popup', 'orders',
228
-                 'payments', 'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'extraAmt', 'comments'));
228
+                    'payments', 'invoiceSum', 'amountReceived', 'pendingAmount', 'currency', 'extraAmt', 'comments'));
229 229
         } catch (\Exception $ex) {
230 230
             app('log')->info($ex->getMessage());
231 231
             Bugsnag::notifyException($ex);
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             return view('themes.default1.user.client.edit',
398 398
                 compact('bussinesses', 'user', 'timezones', 'state',
399 399
                     'states', 'managers', 'selectedCurrency', 'selectedCompany',
400
-                     'selectedIndustry', 'selectedCompanySize'));
400
+                        'selectedIndustry', 'selectedCompanySize'));
401 401
         } catch (\Exception $ex) {
402 402
             app('log')->error($ex->getMessage());
403 403
 
@@ -493,9 +493,9 @@  discard block
 block discarded – undo
493 493
                 return \Response::json([]);
494 494
             }
495 495
             $users = User::where('email', 'LIKE', '%'.$term.'%')
496
-             ->orWhere('first_name', 'LIKE', '%'.$term.'%')
497
-             ->orWhere('last_name', 'LIKE', '%'.$term.'%')
498
-             ->select('id', 'email', 'profile_pic', 'first_name', 'last_name')->get();
496
+                ->orWhere('first_name', 'LIKE', '%'.$term.'%')
497
+                ->orWhere('last_name', 'LIKE', '%'.$term.'%')
498
+                ->select('id', 'email', 'profile_pic', 'first_name', 'last_name')->get();
499 499
             $formatted_tags = [];
500 500
 
501 501
             foreach ($users as $user) {
@@ -511,8 +511,8 @@  discard block
 block discarded – undo
511 511
     }
512 512
 
513 513
     public function advanceSearch($name = '', $username = '', $company = '',
514
-     $mobile = '', $email = '', $country = '', $industry = '',
515
-      $company_type = '', $company_size = '', $role = '', $position = '', $reg_from = '', $reg_till = '')
514
+        $mobile = '', $email = '', $country = '', $industry = '',
515
+        $company_type = '', $company_size = '', $role = '', $position = '', $reg_from = '', $reg_till = '')
516 516
     {
517 517
         $join = \DB::table('users');
518 518
         $join = $this->getNamUserCom($join, $name, $username, $company);
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 
524 524
         $join = $join->orderBy('created_at', 'desc')
525 525
         ->select('id', 'first_name', 'last_name', 'email', 'created_at',
526
-         'active', 'mobile_verified', 'role', 'position');
526
+            'active', 'mobile_verified', 'role', 'position');
527 527
 
528 528
         return $join;
529 529
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -81,18 +81,18 @@  discard block
 block discarded – undo
81 81
          $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position, $reg_from, $reg_till);
82 82
 
83 83
         return\ DataTables::of($user->get())
84
-                         ->addColumn('checkbox', function ($model) {
84
+                         ->addColumn('checkbox', function($model) {
85 85
                              return "<input type='checkbox' class='user_checkbox' 
86 86
                             value=".$model->id.' name=select[] id=check>';
87 87
                          })
88
-                        ->addColumn('first_name', function ($model) {
88
+                        ->addColumn('first_name', function($model) {
89 89
                             return '<a href='.url('clients/'.$model->id).'>'
90 90
                             .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>';
91 91
                         })
92
-                         ->addColumn('email', function ($model) {
92
+                         ->addColumn('email', function($model) {
93 93
                              return $model->email;
94 94
                          })
95
-                          ->addColumn('created_at', function ($model) {
95
+                          ->addColumn('created_at', function($model) {
96 96
                               $ends = $model->created_at;
97 97
                               if ($ends) {
98 98
                                   $date1 = new DateTime($ends);
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                               return $end;
105 105
                           })
106 106
                         // ->showColumns('email', 'created_at')
107
-                        ->addColumn('active', function ($model) {
107
+                        ->addColumn('active', function($model) {
108 108
                             if ($model->active == 1) {
109 109
                                 $email = "<span class='glyphicon glyphicon-envelope'
110 110
                                  style='color:green' title='verified email'></span>";
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 
123 123
                             return $email.'&nbsp;&nbsp;'.$mobile;
124 124
                         })
125
-                        ->addColumn('action', function ($model) {
125
+                        ->addColumn('action', function($model) {
126 126
                             return '<a href='.url('clients/'.$model->id.'/edit')
127 127
                             ." class='btn btn-sm btn-primary btn-xs'>
128 128
                             <i class='fa fa-edit' style='color:white;'> </i>&nbsp;&nbsp;Edit</a>"
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                                     <i class='fa fa-eye' style='color:white;'> </i>&nbsp;&nbsp;View</a>";
132 132
                             // return 'hhhh';
133 133
                         })
134
-                        ->rawColumns(['checkbox', 'first_name', 'email',  'created_at', 'active', 'action'])
134
+                        ->rawColumns(['checkbox', 'first_name', 'email', 'created_at', 'active', 'action'])
135 135
                         ->make(true);
136 136
 
137 137
         // ->searchColumns('email', 'first_name')
Please login to merge, or discard this patch.
app/Http/Requests/User/ProfileRequest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
                     'zip'                    => 'required|numeric',
38 38
                     'user_name'              => 'required|unique:users,user_name,'.$userid,
39 39
                     'bussiness'              => 'required',
40
-                     'profile_pic'           => 'sometimes|mimes:jpeg,jpg,png,gif|max:100000',
40
+                        'profile_pic'           => 'sometimes|mimes:jpeg,jpg,png,gif|max:100000',
41 41
 
42 42
         ];
43 43
         }
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
             $userid = \Auth::user()->id;
47 47
 
48 48
             return [
49
-                     'first_name'            => 'required|min:3|max:30',
49
+                        'first_name'            => 'required|min:3|max:30',
50 50
                     'last_name'              => 'required|max:30',
51
-                     'mobile'                => 'required|regex:/[0-9]/|min:5|max:20',
52
-                     'email'                 => 'required',
51
+                        'mobile'                => 'required|regex:/[0-9]/|min:5|max:20',
52
+                        'email'                 => 'required',
53 53
                     'mobile_code'            => 'required|numeric',
54 54
                     'mobile'                 => 'required|numeric',
55 55
                     'zip'                    => 'required|numeric',
Please login to merge, or discard this patch.
app/Model/Product/Product.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
     protected static $logName = 'Product';
20 20
 
21 21
     protected static $logAttributes = ['name', 'description', 'type', 'file', 'category',
22
-         'github_owner', 'github_repository', 'version',  'subscription', 'hidden', 'product_sku', ];
22
+            'github_owner', 'github_repository', 'version',  'subscription', 'hidden', 'product_sku', ];
23 23
 
24 24
     protected static $logOnlyDirty = true;
25 25
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
     use LogsActivity;
11 11
     protected $table = 'products';
12 12
     protected $fillable = ['name', 'description', 'type', 'group', 'file', 'image', 'require_domain', 'category',
13
-        'can_modify_agent',  'can_modify_quantity', 'show_agent', 'tax_apply', 'show_product_quantity', 'hidden',  'auto_terminate',
13
+        'can_modify_agent', 'can_modify_quantity', 'show_agent', 'tax_apply', 'show_product_quantity', 'hidden', 'auto_terminate',
14 14
         'setup_order_placed', 'setup_first_payment', 'setup_accept_manually',
15 15
         'no_auto_setup', 'shoping_cart_link', 'process_url', 'github_owner',
16 16
         'github_repository',
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     protected static $logName = 'Product';
20 20
 
21 21
     protected static $logAttributes = ['name', 'description', 'type', 'file', 'category',
22
-         'github_owner', 'github_repository', 'version',  'subscription', 'hidden', 'product_sku', ];
22
+         'github_owner', 'github_repository', 'version', 'subscription', 'hidden', 'product_sku', ];
23 23
 
24 24
     protected static $logOnlyDirty = true;
25 25
 
Please login to merge, or discard this patch.
app/Console/Kernel.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
      */
17 17
     protected $commands = [
18 18
         //
19
-         'App\Console\Commands\Inspire',
20
-         \App\Console\Commands\Install::class,
19
+            'App\Console\Commands\Inspire',
20
+            \App\Console\Commands\Install::class,
21 21
         'App\Console\Commands\ExpiryCron',
22 22
     ];
23 23
 
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
             switch ($task) {
51 51
             case 'expiryMail':
52 52
                if ($expiryMailStatus == 1) {
53
-                   return $this->getCondition($schedule->command('expiry:notification'), $command);
54
-               }
53
+                    return $this->getCondition($schedule->command('expiry:notification'), $command);
54
+                }
55 55
 
56 56
             case 'deleteLogs':
57 57
              if ($logDeleteStatus == 1) {
58
-                 return $this->getCondition($schedule->command('activitylog:clean'), $command);
59
-             }
58
+                    return $this->getCondition($schedule->command('activitylog:clean'), $command);
59
+                }
60 60
             }
61 61
         }
62 62
     }
Please login to merge, or discard this patch.
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -48,15 +48,15 @@
 block discarded – undo
48 48
             $condition = new \App\Model\Mailjob\Condition();
49 49
             $command = $condition->getConditionValue($task);
50 50
             switch ($task) {
51
-            case 'expiryMail':
52
-               if ($expiryMailStatus == 1) {
53
-                   return $this->getCondition($schedule->command('expiry:notification'), $command);
54
-               }
51
+                case 'expiryMail':
52
+                   if ($expiryMailStatus == 1) {
53
+                       return $this->getCondition($schedule->command('expiry:notification'), $command);
54
+                   }
55 55
 
56
-            case 'deleteLogs':
57
-             if ($logDeleteStatus == 1) {
58
-                 return $this->getCondition($schedule->command('activitylog:clean'), $command);
59
-             }
56
+                case 'deleteLogs':
57
+                 if ($logDeleteStatus == 1) {
58
+                     return $this->getCondition($schedule->command('activitylog:clean'), $command);
59
+                 }
60 60
             }
61 61
         }
62 62
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Common/MailChimpController.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         try {
83 83
             $merge_fields = $this->field($email);
84 84
             $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No
85
-              $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
85
+                $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
86 86
             $result = $this->mailchimp->post("lists/$this->list_id/members", [
87 87
                 'status'        => $this->mailchimp_set->subscribe_status,
88 88
                 'email_address' => $email,
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
         try {
108 108
             $merge_fields = $this->field($email);
109 109
             $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No
110
-              $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
111
-              $productGroupId = $this->groupRelation->where('agora_product_id', $productid)
112
-              ->pluck('mailchimp_group_cat_id')->first();
110
+                $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
111
+                $productGroupId = $this->groupRelation->where('agora_product_id', $productid)
112
+                ->pluck('mailchimp_group_cat_id')->first();
113 113
             $hash = md5($email);
114 114
             $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
115
-                 'interests'         => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true],
116
-                 //refer to https://us7.api.mailchimp.com/playground
117
-              ]);
115
+                    'interests'         => [$interestGroupIdForNo => true, $interestGroupIdForYes=>false, $productGroupId =>true],
116
+                    //refer to https://us7.api.mailchimp.com/playground
117
+                ]);
118 118
         } catch (Exception $ex) {
119 119
             $exe = json_decode($ex->getMessage(), true);
120 120
         }
@@ -126,16 +126,16 @@  discard block
 block discarded – undo
126 126
         try {
127 127
             $merge_fields = $this->field($email);
128 128
             $interestGroupIdForNo = $this->relation->is_paid_no; //Interest GroupId for IsPaid Is No
129
-              $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
130
-               $productGroupId = $this->groupRelation->where('agora_product_id', $productid)
131
-              ->pluck('mailchimp_group_cat_id')->first();
129
+                $interestGroupIdForYes = $this->relation->is_paid_yes; //Interest GroupId for IsPaid Is Yes
130
+                $productGroupId = $this->groupRelation->where('agora_product_id', $productid)
131
+                ->pluck('mailchimp_group_cat_id')->first();
132 132
 
133 133
             $hash = md5($email);
134 134
             $result = $this->mailchimp->patch("lists/$this->list_id/members/$hash", [
135
-                 'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true, $productGroupId =>true],
135
+                    'interests' => [$interestGroupIdForNo => false, $interestGroupIdForYes=>true, $productGroupId =>true],
136 136
 
137
-                 //refer to https://us7.api.mailchimp.com/playground
138
-              ]);
137
+                    //refer to https://us7.api.mailchimp.com/playground
138
+                ]);
139 139
         } catch (Exception $ex) {
140 140
             dd($ex);
141 141
             $exe = json_decode($ex->getMessage(), true);
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             $country = Country::where('country_code_char2', $user->country)->pluck('nicename')->first();
179 179
             if ($user) {
180 180
                 $fields = ['first_name', 'last_name', 'company', 'mobile',
181
-                 'address', 'town', 'country', 'state', 'zip', 'active', 'role', 'source', ];
181
+                    'address', 'town', 'country', 'state', 'zip', 'active', 'role', 'source', ];
182 182
                 $relation = $this->relation;
183 183
                 $merge_fields = [];
184 184
                 foreach ($fields as $field) {
@@ -329,11 +329,11 @@  discard block
 block discarded – undo
329 329
             // this->addIsPaidInterestFieldsToAgora();
330 330
 
331 331
             $group_fields = $this->groups->where('list_id', $this->list_id)
332
-          ->select('category_name', 'category_option_id', 'category_id')->get()->toArray();
332
+            ->select('category_name', 'category_option_id', 'category_id')->get()->toArray();
333 333
             // dd($group_fields[0]);
334 334
             $relations = MailchimpGroupAgoraRelation::where('id', '!=', 0)
335
-          ->select('agora_product_id', 'mailchimp_group_cat_id')
336
-          ->orderBy('id', 'asc')->get()->toArray();
335
+            ->select('agora_product_id', 'mailchimp_group_cat_id')
336
+            ->orderBy('id', 'asc')->get()->toArray();
337 337
             $productList = [];
338 338
             $categoryList = [];
339 339
             if (count($relations) != 0) {
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
                     // code...
344 344
                 }
345 345
                 // dd(count($categoryList));
346
-         // dd($productList);
346
+            // dd($productList);
347 347
             }
348 348
 
349 349
             // $relations = MailchimpGroupAgoraRelation::where('id', '!=', 0)->orderBy('id', 'asc')->get()->toArray();
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                 echo '<option value='.$field['category_option_id'].'>'.$field['category_option_name'].'</option>';
378 378
 
379 379
                 // array_push($responseData, (['selectedCat'=>$selectedCategory, 'catId'=>$field['category_option_id'],'catName'=>$field['category_option_name']]
380
-                  //  ));
380
+                    //  ));
381 381
             }
382 382
             // return $responseData;
383 383
         }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
             MailchimpGroupAgoraRelation::where('id', '!=', 0)->delete();
428 428
             foreach ($request->row as $key => $value) {
429 429
                 MailchimpGroupAgoraRelation::create(['agora_product_id'=> $value[0],
430
-             'mailchimp_group_cat_id'                                  => $value[1], ]);
430
+                'mailchimp_group_cat_id'                                  => $value[1], ]);
431 431
             }
432 432
 
433 433
             return redirect()->back()->with('success', \Lang::get('message.updated-successfully'));
Please login to merge, or discard this patch.
app/Http/Controllers/Common/SettingsController.php 3 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -255,16 +255,16 @@  discard block
 block discarded – undo
255 255
 
256 256
             return \DataTables::of($query->take(50))
257 257
              ->setTotalRecords($query->count())
258
-             ->addColumn('checkbox', function ($model) {
258
+             ->addColumn('checkbox', function($model) {
259 259
                  return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
260 260
              })
261
-                           ->addColumn('name', function ($model) {
261
+                           ->addColumn('name', function($model) {
262 262
                                return ucfirst($model->log_name);
263 263
                            })
264
-                             ->addColumn('description', function ($model) {
264
+                             ->addColumn('description', function($model) {
265 265
                                  return ucfirst($model->description);
266 266
                              })
267
-                          ->addColumn('username', function ($model) {
267
+                          ->addColumn('username', function($model) {
268 268
                               $causer_id = $model->causer_id;
269 269
                               $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
270 270
                               foreach ($names as $key => $value) {
@@ -273,41 +273,41 @@  discard block
 block discarded – undo
273 273
                                   return $fullName;
274 274
                               }
275 275
                           })
276
-                              ->addColumn('role', function ($model) {
276
+                              ->addColumn('role', function($model) {
277 277
                                   $causer_id = $model->causer_id;
278 278
                                   $role = User::where('id', $causer_id)->pluck('role');
279 279
 
280 280
                                   return json_decode($role);
281 281
                               })
282
-                               ->addColumn('new', function ($model) {
282
+                               ->addColumn('new', function($model) {
283 283
                                    $properties = ($model->properties);
284 284
                                    $newEntry = $this->getNewEntry($properties, $model);
285 285
 
286 286
                                    return $newEntry;
287 287
                                })
288
-                                ->addColumn('old', function ($model) {
288
+                                ->addColumn('old', function($model) {
289 289
                                     $data = ($model->properties);
290 290
                                     $oldEntry = $this->getOldEntry($data, $model);
291 291
 
292 292
                                     return $oldEntry;
293 293
                                 })
294
-                                ->addColumn('created_at', function ($model) {
294
+                                ->addColumn('created_at', function($model) {
295 295
                                     $newDate = $this->getDate($model->created_at);
296 296
 
297 297
                                     return $newDate;
298 298
                                 })
299 299
 
300
-                                    ->filterColumn('log_name', function ($query, $keyword) {
300
+                                    ->filterColumn('log_name', function($query, $keyword) {
301 301
                                         $sql = 'log_name like ?';
302 302
                                         $query->whereRaw($sql, ["%{$keyword}%"]);
303 303
                                     })
304 304
 
305
-                                ->filterColumn('description', function ($query, $keyword) {
305
+                                ->filterColumn('description', function($query, $keyword) {
306 306
                                     $sql = 'description like ?';
307 307
                                     $query->whereRaw($sql, ["%{$keyword}%"]);
308 308
                                 })
309 309
 
310
-                            ->filterColumn('causer_id', function ($query, $keyword) {
310
+                            ->filterColumn('causer_id', function($query, $keyword) {
311 311
                                 $sql = 'first_name like ?';
312 312
                                 $query->whereRaw($sql, ["%{$keyword}%"]);
313 313
                             })
@@ -329,37 +329,37 @@  discard block
 block discarded – undo
329 329
             $email_log = \DB::table('email_log')->get();
330 330
 
331 331
             return\ DataTables::of($email_log)
332
-             ->addColumn('checkbox', function ($model) {
332
+             ->addColumn('checkbox', function($model) {
333 333
                  return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
334 334
              })
335
-                           ->addColumn('date', function ($model) {
335
+                           ->addColumn('date', function($model) {
336 336
                                return ucfirst($model->date);
337 337
                            })
338
-                             ->addColumn('from', function ($model) {
338
+                             ->addColumn('from', function($model) {
339 339
                                  $from = Markdown::convertToHtml(ucfirst($model->from));
340 340
 
341 341
                                  return $from;
342 342
                              })
343
-                              ->addColumn('to', function ($model) {
343
+                              ->addColumn('to', function($model) {
344 344
                                   $to = Markdown::convertToHtml(ucfirst($model->to));
345 345
 
346 346
                                   return $to;
347 347
                               })
348
-                             ->addColumn('cc', function ($model) {
348
+                             ->addColumn('cc', function($model) {
349 349
                                  $cc = '--';
350 350
 
351 351
                                  return $cc;
352 352
                              })
353 353
 
354
-                               ->addColumn('subject', function ($model) {
354
+                               ->addColumn('subject', function($model) {
355 355
                                    return ucfirst($model->subject);
356 356
                                })
357
-                                ->addColumn('headers', function ($model) {
357
+                                ->addColumn('headers', function($model) {
358 358
                                     $headers = Markdown::convertToHtml(ucfirst($model->headers));
359 359
 
360 360
                                     return $headers;
361 361
                                 })
362
-                              ->addColumn('status', function ($model) {
362
+                              ->addColumn('status', function($model) {
363 363
                                   return ucfirst($model->status);
364 364
                               })
365 365
 
Please login to merge, or discard this patch.
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -279,37 +279,37 @@  discard block
 block discarded – undo
279 279
             $query = $this->advanceSearch($from, $till, $delFrom, $delTill);
280 280
 
281 281
             return \DataTables::of($query->take(50))
282
-             ->setTotalRecords($query->count())
283
-             ->addColumn('checkbox', function ($model) {
284
-                 return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
285
-             })
286
-                           ->addColumn('name', function ($model) {
287
-                               return ucfirst($model->log_name);
288
-                           })
289
-                             ->addColumn('description', function ($model) {
290
-                                 return ucfirst($model->description);
291
-                             })
292
-                          ->addColumn('username', function ($model) {
293
-                              $causer_id = $model->causer_id;
294
-                              $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
295
-                              foreach ($names as $key => $value) {
296
-                                  $fullName = $key.' '.$value;
297
-
298
-                                  return $fullName;
299
-                              }
300
-                          })
301
-                              ->addColumn('role', function ($model) {
302
-                                  $causer_id = $model->causer_id;
303
-                                  $role = User::where('id', $causer_id)->pluck('role');
304
-
305
-                                  return json_decode($role);
306
-                              })
307
-                               ->addColumn('new', function ($model) {
308
-                                   $properties = ($model->properties);
309
-                                   $newEntry = $this->getNewEntry($properties, $model);
310
-
311
-                                   return $newEntry;
312
-                               })
282
+                ->setTotalRecords($query->count())
283
+                ->addColumn('checkbox', function ($model) {
284
+                    return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
285
+                })
286
+                            ->addColumn('name', function ($model) {
287
+                                return ucfirst($model->log_name);
288
+                            })
289
+                                ->addColumn('description', function ($model) {
290
+                                    return ucfirst($model->description);
291
+                                })
292
+                            ->addColumn('username', function ($model) {
293
+                                $causer_id = $model->causer_id;
294
+                                $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
295
+                                foreach ($names as $key => $value) {
296
+                                    $fullName = $key.' '.$value;
297
+
298
+                                    return $fullName;
299
+                                }
300
+                            })
301
+                                ->addColumn('role', function ($model) {
302
+                                    $causer_id = $model->causer_id;
303
+                                    $role = User::where('id', $causer_id)->pluck('role');
304
+
305
+                                    return json_decode($role);
306
+                                })
307
+                                ->addColumn('new', function ($model) {
308
+                                    $properties = ($model->properties);
309
+                                    $newEntry = $this->getNewEntry($properties, $model);
310
+
311
+                                    return $newEntry;
312
+                                })
313 313
                                 ->addColumn('old', function ($model) {
314 314
                                     $data = ($model->properties);
315 315
                                     $oldEntry = $this->getOldEntry($data, $model);
@@ -354,39 +354,39 @@  discard block
 block discarded – undo
354 354
             $email_log = \DB::table('email_log')->get();
355 355
 
356 356
             return\ DataTables::of($email_log)
357
-             ->addColumn('checkbox', function ($model) {
358
-                 return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
359
-             })
360
-                           ->addColumn('date', function ($model) {
361
-                               return ucfirst($model->date);
362
-                           })
363
-                             ->addColumn('from', function ($model) {
364
-                                 $from = Markdown::convertToHtml(ucfirst($model->from));
365
-
366
-                                 return $from;
367
-                             })
368
-                              ->addColumn('to', function ($model) {
369
-                                  $to = Markdown::convertToHtml(ucfirst($model->to));
370
-
371
-                                  return $to;
372
-                              })
373
-                             ->addColumn('cc', function ($model) {
374
-                                 $cc = '--';
375
-
376
-                                 return $cc;
377
-                             })
378
-
379
-                               ->addColumn('subject', function ($model) {
380
-                                   return ucfirst($model->subject);
381
-                               })
357
+                ->addColumn('checkbox', function ($model) {
358
+                    return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
359
+                })
360
+                            ->addColumn('date', function ($model) {
361
+                                return ucfirst($model->date);
362
+                            })
363
+                                ->addColumn('from', function ($model) {
364
+                                    $from = Markdown::convertToHtml(ucfirst($model->from));
365
+
366
+                                    return $from;
367
+                                })
368
+                                ->addColumn('to', function ($model) {
369
+                                    $to = Markdown::convertToHtml(ucfirst($model->to));
370
+
371
+                                    return $to;
372
+                                })
373
+                                ->addColumn('cc', function ($model) {
374
+                                    $cc = '--';
375
+
376
+                                    return $cc;
377
+                                })
378
+
379
+                                ->addColumn('subject', function ($model) {
380
+                                    return ucfirst($model->subject);
381
+                                })
382 382
                                 ->addColumn('headers', function ($model) {
383 383
                                     $headers = Markdown::convertToHtml(ucfirst($model->headers));
384 384
 
385 385
                                     return $headers;
386 386
                                 })
387
-                              ->addColumn('status', function ($model) {
388
-                                  return ucfirst($model->status);
389
-                              })
387
+                                ->addColumn('status', function ($model) {
388
+                                    return ucfirst($model->status);
389
+                                })
390 390
 
391 391
                             ->rawColumns(['checkbox', 'date', 'from', 'to', 'cc',
392 392
                                 'bcc', 'subject', 'headers', 'status', ])
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,8 @@
 block discarded – undo
96 96
                     $pluginName[] = $plugin->name; //get the name of active plugin
97 97
                 }
98 98
 
99
-                if (count($models) > 0) {//If more than 1 plugin is active it will check the currencies allowed for that plugin.If the currencies allowed matches the passed arguement(currency),that plugin name is returned
99
+                if (count($models) > 0) {
100
+//If more than 1 plugin is active it will check the currencies allowed for that plugin.If the currencies allowed matches the passed arguement(currency),that plugin name is returned
100 101
                     for ($i = 0; $i < count($pluginName); $i++) {
101 102
                         $currencies = explode(',', $models[$i]->currencies);
102 103
                         if (in_array($currency, $currencies)) {
Please login to merge, or discard this patch.