@@ -8,5 +8,5 @@ |
||
| 8 | 8 | { |
| 9 | 9 | protected $table = 'status_settings'; |
| 10 | 10 | public $timestamps = false; |
| 11 | - protected $fillable = ['expiry_mail', 'activity_log_delete', 'license_status', 'github_status', 'mailchimp_status', 'twitter_status', 'msg91_status', 'emailverification_status', 'recaptcha_status', 'update_status', 'zoho_status', 'rzp_status', 'mailchimp_product_status', 'mailchimp_ispaid_status', 'terms','pipedrive_status']; |
|
| 11 | + protected $fillable = ['expiry_mail', 'activity_log_delete', 'license_status', 'github_status', 'mailchimp_status', 'twitter_status', 'msg91_status', 'emailverification_status', 'recaptcha_status', 'update_status', 'zoho_status', 'rzp_status', 'mailchimp_product_status', 'mailchimp_ispaid_status', 'terms', 'pipedrive_status']; |
|
| 12 | 12 | } |
@@ -215,9 +215,9 @@ |
||
| 215 | 215 | $countryFullName = Country::where('country_code_char2', $user->country)->pluck('nicename')->first(); |
| 216 | 216 | $pipedrive = new \Devio\Pipedrive\Pipedrive($token); |
| 217 | 217 | $orgId = $pipedrive->organizations->add(['name'=>$user->company])->getContent()->data->id; |
| 218 | - $person = $pipedrive->persons()->add(['name' => $user->first_name .' '. $user->last_name,'email'=>$user->email, |
|
| 219 | - 'phone'=>'+'.$user->mobile_code.$user->mobile,'org_id'=>$orgId,'af1c1908b70a61f2baf8b33a975a185cce1aefe5'=>$countryFullName]); |
|
| 220 | - $personId= $person->getContent()->data->id; |
|
| 221 | - $organization = $pipedrive->deals()->add(['title'=>$user->company.' '.'deal','person_id'=>$personId,'org_id'=>$orgId]); |
|
| 218 | + $person = $pipedrive->persons()->add(['name' => $user->first_name.' '.$user->last_name, 'email'=>$user->email, |
|
| 219 | + 'phone'=>'+'.$user->mobile_code.$user->mobile, 'org_id'=>$orgId, 'af1c1908b70a61f2baf8b33a975a185cce1aefe5'=>$countryFullName]); |
|
| 220 | + $personId = $person->getContent()->data->id; |
|
| 221 | + $organization = $pipedrive->deals()->add(['title'=>$user->company.' '.'deal', 'person_id'=>$personId, 'org_id'=>$orgId]); |
|
| 222 | 222 | } |
| 223 | 223 | } |
@@ -72,8 +72,8 @@ |
||
| 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 |
|
| 76 | - $this->addToPipedrive($user); |
|
| 75 | + if($pipedriveStatus == 1) {//Add to Pipedrive |
|
| 76 | + $this->addToPipedrive($user); |
|
| 77 | 77 | } |
| 78 | 78 | if ($zohoStatus) {//Add to Zoho |
| 79 | 79 | $zoho = $this->reqFields($user, $email); |
@@ -72,7 +72,7 @@ |
||
| 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) {//Add to Pipedrive |
|
| 76 | 76 | $this->addToPipedrive($user); |
| 77 | 77 | } |
| 78 | 78 | if ($zohoStatus) {//Add to Zoho |
@@ -72,10 +72,12 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 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(); |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $pipedriveStatus = StatusSetting::pluck('pipedrive_status')->first(); |
| 84 | 84 | $model = $apikeys->find(1); |
| 85 | 85 | |
| 86 | - return view('themes.default1.common.apikey', compact('model', 'status', 'licenseSecret', 'licenseUrl', 'siteKey', 'secretKey', 'captchaStatus', 'updateStatus', 'updateSecret', 'updateUrl', 'mobileStatus', 'mobileauthkey', 'emailStatus', 'twitterStatus', 'twitterKeys', 'zohoStatus', 'zohoKey', 'rzpStatus', 'rzpKeys', 'mailchimpSetting', 'mailchimpKey', 'termsStatus', 'termsUrl','pipedriveKey','pipedriveStatus')); |
|
| 86 | + return view('themes.default1.common.apikey', compact('model', 'status', 'licenseSecret', 'licenseUrl', 'siteKey', 'secretKey', 'captchaStatus', 'updateStatus', 'updateSecret', 'updateUrl', 'mobileStatus', 'mobileauthkey', 'emailStatus', 'twitterStatus', 'twitterKeys', 'zohoStatus', 'zohoKey', 'rzpStatus', 'rzpKeys', 'mailchimpSetting', 'mailchimpKey', 'termsStatus', 'termsUrl', 'pipedriveKey', 'pipedriveStatus')); |
|
| 87 | 87 | } catch (\Exception $ex) { |
| 88 | 88 | return redirect('/')->with('fails', $ex->getMessage()); |
| 89 | 89 | } |
@@ -305,16 +305,16 @@ discard block |
||
| 305 | 305 | |
| 306 | 306 | return \DataTables::of($query->take(50)) |
| 307 | 307 | ->setTotalRecords($query->count()) |
| 308 | - ->addColumn('checkbox', function ($model) { |
|
| 308 | + ->addColumn('checkbox', function($model) { |
|
| 309 | 309 | return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>'; |
| 310 | 310 | }) |
| 311 | - ->addColumn('name', function ($model) { |
|
| 311 | + ->addColumn('name', function($model) { |
|
| 312 | 312 | return ucfirst($model->log_name); |
| 313 | 313 | }) |
| 314 | - ->addColumn('description', function ($model) { |
|
| 314 | + ->addColumn('description', function($model) { |
|
| 315 | 315 | return ucfirst($model->description); |
| 316 | 316 | }) |
| 317 | - ->addColumn('username', function ($model) { |
|
| 317 | + ->addColumn('username', function($model) { |
|
| 318 | 318 | $causer_id = $model->causer_id; |
| 319 | 319 | $names = User::where('id', $causer_id)->pluck('last_name', 'first_name'); |
| 320 | 320 | foreach ($names as $key => $value) { |
@@ -323,41 +323,41 @@ discard block |
||
| 323 | 323 | return $fullName; |
| 324 | 324 | } |
| 325 | 325 | }) |
| 326 | - ->addColumn('role', function ($model) { |
|
| 326 | + ->addColumn('role', function($model) { |
|
| 327 | 327 | $causer_id = $model->causer_id; |
| 328 | 328 | $role = User::where('id', $causer_id)->pluck('role'); |
| 329 | 329 | |
| 330 | 330 | return json_decode($role); |
| 331 | 331 | }) |
| 332 | - ->addColumn('new', function ($model) { |
|
| 332 | + ->addColumn('new', function($model) { |
|
| 333 | 333 | $properties = ($model->properties); |
| 334 | 334 | $newEntry = $this->getNewEntry($properties, $model); |
| 335 | 335 | |
| 336 | 336 | return $newEntry; |
| 337 | 337 | }) |
| 338 | - ->addColumn('old', function ($model) { |
|
| 338 | + ->addColumn('old', function($model) { |
|
| 339 | 339 | $data = ($model->properties); |
| 340 | 340 | $oldEntry = $this->getOldEntry($data, $model); |
| 341 | 341 | |
| 342 | 342 | return $oldEntry; |
| 343 | 343 | }) |
| 344 | - ->addColumn('created_at', function ($model) { |
|
| 344 | + ->addColumn('created_at', function($model) { |
|
| 345 | 345 | $newDate = $this->getDate($model->created_at); |
| 346 | 346 | |
| 347 | 347 | return $newDate; |
| 348 | 348 | }) |
| 349 | 349 | |
| 350 | - ->filterColumn('log_name', function ($query, $keyword) { |
|
| 350 | + ->filterColumn('log_name', function($query, $keyword) { |
|
| 351 | 351 | $sql = 'log_name like ?'; |
| 352 | 352 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 353 | 353 | }) |
| 354 | 354 | |
| 355 | - ->filterColumn('description', function ($query, $keyword) { |
|
| 355 | + ->filterColumn('description', function($query, $keyword) { |
|
| 356 | 356 | $sql = 'description like ?'; |
| 357 | 357 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 358 | 358 | }) |
| 359 | 359 | |
| 360 | - ->filterColumn('causer_id', function ($query, $keyword) { |
|
| 360 | + ->filterColumn('causer_id', function($query, $keyword) { |
|
| 361 | 361 | $sql = 'first_name like ?'; |
| 362 | 362 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 363 | 363 | }) |
@@ -378,10 +378,10 @@ discard block |
||
| 378 | 378 | $email_log = \DB::table('email_log')->orderBy('date', 'desc')->get(); |
| 379 | 379 | |
| 380 | 380 | return\ DataTables::of($email_log) |
| 381 | - ->addColumn('checkbox', function ($model) { |
|
| 381 | + ->addColumn('checkbox', function($model) { |
|
| 382 | 382 | return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>'; |
| 383 | 383 | }) |
| 384 | - ->addColumn('date', function ($model) { |
|
| 384 | + ->addColumn('date', function($model) { |
|
| 385 | 385 | $date = $model->date; |
| 386 | 386 | if ($date) { |
| 387 | 387 | $date1 = new \DateTime($date); |
@@ -392,18 +392,18 @@ discard block |
||
| 392 | 392 | |
| 393 | 393 | return $finalDate; |
| 394 | 394 | }) |
| 395 | - ->addColumn('from', function ($model) { |
|
| 395 | + ->addColumn('from', function($model) { |
|
| 396 | 396 | $from = Markdown::convertToHtml($model->from); |
| 397 | 397 | |
| 398 | 398 | return $from; |
| 399 | 399 | }) |
| 400 | - ->addColumn('to', function ($model) { |
|
| 400 | + ->addColumn('to', function($model) { |
|
| 401 | 401 | $to = Markdown::convertToHtml($model->to); |
| 402 | 402 | |
| 403 | 403 | return $to; |
| 404 | 404 | }) |
| 405 | 405 | |
| 406 | - ->addColumn('subject', function ($model) { |
|
| 406 | + ->addColumn('subject', function($model) { |
|
| 407 | 407 | return ucfirst($model->subject); |
| 408 | 408 | }) |
| 409 | 409 | // ->addColumn('headers', function ($model) { |
@@ -411,12 +411,12 @@ discard block |
||
| 411 | 411 | |
| 412 | 412 | // return $headers; |
| 413 | 413 | // }) |
| 414 | - ->addColumn('status', function ($model) { |
|
| 414 | + ->addColumn('status', function($model) { |
|
| 415 | 415 | return ucfirst($model->status); |
| 416 | 416 | }) |
| 417 | 417 | |
| 418 | 418 | ->rawColumns(['checkbox', 'date', 'from', 'to', |
| 419 | - 'bcc', 'subject', 'status', ]) |
|
| 419 | + 'bcc', 'subject', 'status', ]) |
|
| 420 | 420 | ->make(true); |
| 421 | 421 | } catch (\Exception $e) { |
| 422 | 422 | Bugsnag::notifyException($e); |