Completed
Push — development ( 0edce8...d393e3 )
by Bhanu
26:36 queued 16:59
created
app/Http/Controllers/Common/SettingsController.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $mobileauthkey = $apikeys->pluck('msg91_auth_key')->first();
69 69
             $updateUrl = $apikeys->pluck('update_api_url')->first();
70 70
             $emailStatus = StatusSetting::pluck('emailverification_status')->first();
71
-            $twitterKeys = $apikeys->select('twitter_consumer_key','twitter_consumer_secret',
71
+            $twitterKeys = $apikeys->select('twitter_consumer_key', 'twitter_consumer_secret',
72 72
                 'twitter_access_token', 'access_tooken_secret')->first();
73 73
             $twitterStatus = $this->statusSetting->pluck('twitter_status')->first();
74 74
             $zohoStatus = $this->statusSetting->pluck('zoho_status')->first();
@@ -303,16 +303,16 @@  discard block
 block discarded – undo
303 303
 
304 304
             return \DataTables::of($query->take(50))
305 305
              ->setTotalRecords($query->count())
306
-             ->addColumn('checkbox', function ($model) {
306
+             ->addColumn('checkbox', function($model) {
307 307
                  return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>';
308 308
              })
309
-                           ->addColumn('name', function ($model) {
309
+                           ->addColumn('name', function($model) {
310 310
                                return ucfirst($model->log_name);
311 311
                            })
312
-                             ->addColumn('description', function ($model) {
312
+                             ->addColumn('description', function($model) {
313 313
                                  return ucfirst($model->description);
314 314
                              })
315
-                          ->addColumn('username', function ($model) {
315
+                          ->addColumn('username', function($model) {
316 316
                               $causer_id = $model->causer_id;
317 317
                               $names = User::where('id', $causer_id)->pluck('last_name', 'first_name');
318 318
                               foreach ($names as $key => $value) {
@@ -321,41 +321,41 @@  discard block
 block discarded – undo
321 321
                                   return $fullName;
322 322
                               }
323 323
                           })
324
-                              ->addColumn('role', function ($model) {
324
+                              ->addColumn('role', function($model) {
325 325
                                   $causer_id = $model->causer_id;
326 326
                                   $role = User::where('id', $causer_id)->pluck('role');
327 327
 
328 328
                                   return json_decode($role);
329 329
                               })
330
-                               ->addColumn('new', function ($model) {
330
+                               ->addColumn('new', function($model) {
331 331
                                    $properties = ($model->properties);
332 332
                                    $newEntry = $this->getNewEntry($properties, $model);
333 333
 
334 334
                                    return $newEntry;
335 335
                                })
336
-                                ->addColumn('old', function ($model) {
336
+                                ->addColumn('old', function($model) {
337 337
                                     $data = ($model->properties);
338 338
                                     $oldEntry = $this->getOldEntry($data, $model);
339 339
 
340 340
                                     return $oldEntry;
341 341
                                 })
342
-                                ->addColumn('created_at', function ($model) {
342
+                                ->addColumn('created_at', function($model) {
343 343
                                     $newDate = $this->getDate($model->created_at);
344 344
 
345 345
                                     return $newDate;
346 346
                                 })
347 347
 
348
-                                    ->filterColumn('log_name', function ($query, $keyword) {
348
+                                    ->filterColumn('log_name', function($query, $keyword) {
349 349
                                         $sql = 'log_name like ?';
350 350
                                         $query->whereRaw($sql, ["%{$keyword}%"]);
351 351
                                     })
352 352
 
353
-                                ->filterColumn('description', function ($query, $keyword) {
353
+                                ->filterColumn('description', function($query, $keyword) {
354 354
                                     $sql = 'description like ?';
355 355
                                     $query->whereRaw($sql, ["%{$keyword}%"]);
356 356
                                 })
357 357
 
358
-                            ->filterColumn('causer_id', function ($query, $keyword) {
358
+                            ->filterColumn('causer_id', function($query, $keyword) {
359 359
                                 $sql = 'first_name like ?';
360 360
                                 $query->whereRaw($sql, ["%{$keyword}%"]);
361 361
                             })
@@ -376,10 +376,10 @@  discard block
 block discarded – undo
376 376
             $email_log = \DB::table('email_log')->orderBy('date', 'desc')->get();
377 377
 
378 378
             return\ DataTables::of($email_log)
379
-             ->addColumn('checkbox', function ($model) {
379
+             ->addColumn('checkbox', function($model) {
380 380
                  return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>';
381 381
              })
382
-                           ->addColumn('date', function ($model) {
382
+                           ->addColumn('date', function($model) {
383 383
                                $date = $model->date;
384 384
                                if ($date) {
385 385
                                    $date1 = new \DateTime($date);
@@ -390,18 +390,18 @@  discard block
 block discarded – undo
390 390
 
391 391
                                return $finalDate;
392 392
                            })
393
-                             ->addColumn('from', function ($model) {
393
+                             ->addColumn('from', function($model) {
394 394
                                  $from = Markdown::convertToHtml($model->from);
395 395
 
396 396
                                  return $from;
397 397
                              })
398
-                              ->addColumn('to', function ($model) {
398
+                              ->addColumn('to', function($model) {
399 399
                                   $to = Markdown::convertToHtml($model->to);
400 400
 
401 401
                                   return $to;
402 402
                               })
403 403
 
404
-                               ->addColumn('subject', function ($model) {
404
+                               ->addColumn('subject', function($model) {
405 405
                                    return ucfirst($model->subject);
406 406
                                })
407 407
                                 // ->addColumn('headers', function ($model) {
@@ -409,12 +409,12 @@  discard block
 block discarded – undo
409 409
 
410 410
                                 //     return $headers;
411 411
                                 // })
412
-                              ->addColumn('status', function ($model) {
412
+                              ->addColumn('status', function($model) {
413 413
                                   return ucfirst($model->status);
414 414
                               })
415 415
 
416 416
                             ->rawColumns(['checkbox', 'date', 'from', 'to',
417
-                                'bcc', 'subject',  'status', ])
417
+                                'bcc', 'subject', 'status', ])
418 418
                             ->make(true);
419 419
         } catch (\Exception $e) {
420 420
             Bugsnag::notifyException($e);
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AuthController.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,10 +72,12 @@  discard block
 block discarded – undo
72 72
                 $pipedriveStatus = StatusSetting::pluck('pipedrive_status')->first();
73 73
                 $zohoStatus = StatusSetting::pluck('zoho_status')->first();
74 74
                 $mailchimpStatus = StatusSetting::pluck('mailchimp_status')->first();
75
-                if ($pipedriveStatus == 1) {//Add to Pipedrive
75
+                if ($pipedriveStatus == 1) {
76
+//Add to Pipedrive
76 77
                     $this->addToPipedrive($user);
77 78
                 }
78
-                if ($zohoStatus) {//Add to Zoho
79
+                if ($zohoStatus) {
80
+//Add to Zoho
79 81
                     $zoho = $this->reqFields($user, $email);
80 82
                     $auth = ApiKey::where('id', 1)->value('zoho_api_key');
81 83
                     $zohoUrl = 'https://crm.zoho.com/crm/private/xml/Leads/insertRecords??duplicateCheck=1&';
@@ -98,7 +100,8 @@  discard block
 block discarded – undo
98 100
                     curl_close($ch);
99 101
                 }
100 102
 
101
-                if ($mailchimpStatus == 1) {//Add to Mailchimp
103
+                if ($mailchimpStatus == 1) {
104
+//Add to Mailchimp
102 105
                     $mailchimp = new \App\Http\Controllers\Common\MailChimpController();
103 106
                     $r = $mailchimp->addSubscriber($user->email);
104 107
                 }
Please login to merge, or discard this patch.