@@ -52,9 +52,9 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $client = new \GuzzleHttp\Client(); |
| 54 | 54 | $number = $code.$mobile; |
| 55 | - $key = ApiKey::where('id', 1)->select('msg91_auth_key','msg91_sender')->first(); |
|
| 55 | + $key = ApiKey::where('id', 1)->select('msg91_auth_key', 'msg91_sender')->first(); |
|
| 56 | 56 | $response = $client->request('GET', 'https://control.msg91.com/api/sendotp.php', [ |
| 57 | - 'query' => ['authkey' => $key->msg91_auth_key, 'mobile' => $number,'sender'=>$key->msg91_sender], |
|
| 57 | + 'query' => ['authkey' => $key->msg91_auth_key, 'mobile' => $number, 'sender'=>$key->msg91_sender], |
|
| 58 | 58 | ]); |
| 59 | 59 | $send = $response->getBody()->getContents(); |
| 60 | 60 | $array = json_decode($send, true); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $number = $code.$mobile; |
| 75 | 75 | $key = ApiKey::where('id', 1)->value('msg91_auth_key'); |
| 76 | 76 | $response = $client->request('GET', 'https://control.msg91.com/api/retryotp.php', [ |
| 77 | - 'query' => ['authkey' => $key, 'mobile' => $number,'retrytype'=>$type], |
|
| 77 | + 'query' => ['authkey' => $key, 'mobile' => $number, 'retrytype'=>$type], |
|
| 78 | 78 | ]); |
| 79 | 79 | $send = $response->getBody()->getContents(); |
| 80 | 80 | $array = json_decode($send, true); |
@@ -199,26 +199,26 @@ |
||
| 199 | 199 | switch ($request->input('type')) { |
| 200 | 200 | case 'text': |
| 201 | 201 | $array = json_decode($result, true); |
| 202 | - $response = ['type' => 'success', |
|
| 203 | - 'message' => 'OTP has been resent to '.$number.'.Please Enter the OTP to login!!', ]; |
|
| 202 | + $response = ['type' => 'success', |
|
| 203 | + 'message' => 'OTP has been resent to '.$number.'.Please Enter the OTP to login!!', ]; |
|
| 204 | 204 | |
| 205 | 205 | break; |
| 206 | 206 | |
| 207 | 207 | case 'voice': |
| 208 | 208 | $array = json_decode($result, true); |
| 209 | 209 | $response = ['type' => 'success', |
| 210 | - 'message' => 'Voice call has been sent to '.$number.'.Please Enter the OTP received on the call to login!!', ]; |
|
| 210 | + 'message' => 'Voice call has been sent to '.$number.'.Please Enter the OTP received on the call to login!!', ]; |
|
| 211 | 211 | break; |
| 212 | 212 | |
| 213 | 213 | default: |
| 214 | 214 | $array = json_decode($result, true); |
| 215 | 215 | $response = ['type' => 'success', |
| 216 | - 'message' => 'Voice call has been sent to '.$number.'.Please Enter the OTP received on the call to login!!', ]; |
|
| 216 | + 'message' => 'Voice call has been sent to '.$number.'.Please Enter the OTP received on the call to login!!', ]; |
|
| 217 | 217 | break; |
| 218 | 218 | |
| 219 | 219 | } |
| 220 | 220 | |
| 221 | - return response()->json($response); |
|
| 221 | + return response()->json($response); |
|
| 222 | 222 | } catch (\Exception $ex) { |
| 223 | 223 | $result = [$ex->getMessage()]; |
| 224 | 224 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $msg91Sender = $apikeys->pluck('msg91_sender')->first(); |
| 70 | 70 | $updateUrl = $apikeys->pluck('update_api_url')->first(); |
| 71 | 71 | $emailStatus = StatusSetting::pluck('emailverification_status')->first(); |
| 72 | - $twitterKeys = $apikeys->select('twitter_consumer_key','twitter_consumer_secret', |
|
| 72 | + $twitterKeys = $apikeys->select('twitter_consumer_key', 'twitter_consumer_secret', |
|
| 73 | 73 | 'twitter_access_token', 'access_tooken_secret')->first(); |
| 74 | 74 | $twitterStatus = $this->statusSetting->pluck('twitter_status')->first(); |
| 75 | 75 | $zohoStatus = $this->statusSetting->pluck('zoho_status')->first(); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $pipedriveStatus = StatusSetting::pluck('pipedrive_status')->first(); |
| 85 | 85 | $model = $apikeys->find(1); |
| 86 | 86 | |
| 87 | - return view('themes.default1.common.apikey', compact('model', 'status', 'licenseSecret', 'licenseUrl', 'siteKey', 'secretKey', 'captchaStatus', 'updateStatus', 'updateSecret', 'updateUrl', 'mobileStatus', 'mobileauthkey','msg91Sender', 'emailStatus', 'twitterStatus', 'twitterKeys', 'zohoStatus', 'zohoKey', 'rzpStatus', 'rzpKeys', 'mailchimpSetting', 'mailchimpKey', 'termsStatus', 'termsUrl', 'pipedriveKey', 'pipedriveStatus')); |
|
| 87 | + return view('themes.default1.common.apikey', compact('model', 'status', 'licenseSecret', 'licenseUrl', 'siteKey', 'secretKey', 'captchaStatus', 'updateStatus', 'updateSecret', 'updateUrl', 'mobileStatus', 'mobileauthkey', 'msg91Sender', 'emailStatus', 'twitterStatus', 'twitterKeys', 'zohoStatus', 'zohoKey', 'rzpStatus', 'rzpKeys', 'mailchimpSetting', 'mailchimpKey', 'termsStatus', 'termsUrl', 'pipedriveKey', 'pipedriveStatus')); |
|
| 88 | 88 | } catch (\Exception $ex) { |
| 89 | 89 | return redirect('/')->with('fails', $ex->getMessage()); |
| 90 | 90 | } |
@@ -306,16 +306,16 @@ discard block |
||
| 306 | 306 | |
| 307 | 307 | return \DataTables::of($query->take(50)) |
| 308 | 308 | ->setTotalRecords($query->count()) |
| 309 | - ->addColumn('checkbox', function ($model) { |
|
| 309 | + ->addColumn('checkbox', function($model) { |
|
| 310 | 310 | return "<input type='checkbox' class='activity' value=".$model->id.' name=select[] id=check>'; |
| 311 | 311 | }) |
| 312 | - ->addColumn('name', function ($model) { |
|
| 312 | + ->addColumn('name', function($model) { |
|
| 313 | 313 | return ucfirst($model->log_name); |
| 314 | 314 | }) |
| 315 | - ->addColumn('description', function ($model) { |
|
| 315 | + ->addColumn('description', function($model) { |
|
| 316 | 316 | return ucfirst($model->description); |
| 317 | 317 | }) |
| 318 | - ->addColumn('username', function ($model) { |
|
| 318 | + ->addColumn('username', function($model) { |
|
| 319 | 319 | $causer_id = $model->causer_id; |
| 320 | 320 | $names = User::where('id', $causer_id)->pluck('last_name', 'first_name'); |
| 321 | 321 | foreach ($names as $key => $value) { |
@@ -324,41 +324,41 @@ discard block |
||
| 324 | 324 | return $fullName; |
| 325 | 325 | } |
| 326 | 326 | }) |
| 327 | - ->addColumn('role', function ($model) { |
|
| 327 | + ->addColumn('role', function($model) { |
|
| 328 | 328 | $causer_id = $model->causer_id; |
| 329 | 329 | $role = User::where('id', $causer_id)->pluck('role'); |
| 330 | 330 | |
| 331 | 331 | return json_decode($role); |
| 332 | 332 | }) |
| 333 | - ->addColumn('new', function ($model) { |
|
| 333 | + ->addColumn('new', function($model) { |
|
| 334 | 334 | $properties = ($model->properties); |
| 335 | 335 | $newEntry = $this->getNewEntry($properties, $model); |
| 336 | 336 | |
| 337 | 337 | return $newEntry; |
| 338 | 338 | }) |
| 339 | - ->addColumn('old', function ($model) { |
|
| 339 | + ->addColumn('old', function($model) { |
|
| 340 | 340 | $data = ($model->properties); |
| 341 | 341 | $oldEntry = $this->getOldEntry($data, $model); |
| 342 | 342 | |
| 343 | 343 | return $oldEntry; |
| 344 | 344 | }) |
| 345 | - ->addColumn('created_at', function ($model) { |
|
| 345 | + ->addColumn('created_at', function($model) { |
|
| 346 | 346 | $newDate = $this->getDate($model->created_at); |
| 347 | 347 | |
| 348 | 348 | return $newDate; |
| 349 | 349 | }) |
| 350 | 350 | |
| 351 | - ->filterColumn('log_name', function ($query, $keyword) { |
|
| 351 | + ->filterColumn('log_name', function($query, $keyword) { |
|
| 352 | 352 | $sql = 'log_name like ?'; |
| 353 | 353 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 354 | 354 | }) |
| 355 | 355 | |
| 356 | - ->filterColumn('description', function ($query, $keyword) { |
|
| 356 | + ->filterColumn('description', function($query, $keyword) { |
|
| 357 | 357 | $sql = 'description like ?'; |
| 358 | 358 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 359 | 359 | }) |
| 360 | 360 | |
| 361 | - ->filterColumn('causer_id', function ($query, $keyword) { |
|
| 361 | + ->filterColumn('causer_id', function($query, $keyword) { |
|
| 362 | 362 | $sql = 'first_name like ?'; |
| 363 | 363 | $query->whereRaw($sql, ["%{$keyword}%"]); |
| 364 | 364 | }) |
@@ -379,10 +379,10 @@ discard block |
||
| 379 | 379 | $email_log = \DB::table('email_log')->orderBy('date', 'desc')->get(); |
| 380 | 380 | |
| 381 | 381 | return\ DataTables::of($email_log) |
| 382 | - ->addColumn('checkbox', function ($model) { |
|
| 382 | + ->addColumn('checkbox', function($model) { |
|
| 383 | 383 | return "<input type='checkbox' class='email' value=".$model->id.' name=select[] id=check>'; |
| 384 | 384 | }) |
| 385 | - ->addColumn('date', function ($model) { |
|
| 385 | + ->addColumn('date', function($model) { |
|
| 386 | 386 | $date = $model->date; |
| 387 | 387 | if ($date) { |
| 388 | 388 | $date1 = new \DateTime($date); |
@@ -393,18 +393,18 @@ discard block |
||
| 393 | 393 | |
| 394 | 394 | return $finalDate; |
| 395 | 395 | }) |
| 396 | - ->addColumn('from', function ($model) { |
|
| 396 | + ->addColumn('from', function($model) { |
|
| 397 | 397 | $from = Markdown::convertToHtml($model->from); |
| 398 | 398 | |
| 399 | 399 | return $from; |
| 400 | 400 | }) |
| 401 | - ->addColumn('to', function ($model) { |
|
| 401 | + ->addColumn('to', function($model) { |
|
| 402 | 402 | $to = Markdown::convertToHtml($model->to); |
| 403 | 403 | |
| 404 | 404 | return $to; |
| 405 | 405 | }) |
| 406 | 406 | |
| 407 | - ->addColumn('subject', function ($model) { |
|
| 407 | + ->addColumn('subject', function($model) { |
|
| 408 | 408 | return ucfirst($model->subject); |
| 409 | 409 | }) |
| 410 | 410 | // ->addColumn('headers', function ($model) { |
@@ -412,12 +412,12 @@ discard block |
||
| 412 | 412 | |
| 413 | 413 | // return $headers; |
| 414 | 414 | // }) |
| 415 | - ->addColumn('status', function ($model) { |
|
| 415 | + ->addColumn('status', function($model) { |
|
| 416 | 416 | return ucfirst($model->status); |
| 417 | 417 | }) |
| 418 | 418 | |
| 419 | 419 | ->rawColumns(['checkbox', 'date', 'from', 'to', |
| 420 | - 'bcc', 'subject', 'status', ]) |
|
| 420 | + 'bcc', 'subject', 'status', ]) |
|
| 421 | 421 | ->make(true); |
| 422 | 422 | } catch (\Exception $e) { |
| 423 | 423 | Bugsnag::notifyException($e); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | $status = $request->input('status'); |
| 47 | 47 | $key = $request->input('msg91_auth_key'); |
| 48 | 48 | StatusSetting::find(1)->update(['msg91_status'=>$status]); |
| 49 | - ApiKey::find(1)->update(['msg91_auth_key'=>$key,'msg91_sender'=>$request->input('msg91_sender')]); |
|
| 49 | + ApiKey::find(1)->update(['msg91_auth_key'=>$key, 'msg91_sender'=>$request->input('msg91_sender')]); |
|
| 50 | 50 | |
| 51 | 51 | return ['message' => 'success', 'update'=>'Msg91 Settings Updated']; |
| 52 | 52 | } |