fc54e023 by G Manojkumar

Activated all users and Log generation

1 parent 01ec3695
......@@ -7,18 +7,18 @@ use Log;
class SmsController extends Controller
{
public $smsUrl = 'https://10.2.55.165:443/servlet/com.aclwireless.pushconnectivity.listeners.TextListener?';
public $userarray = array("A21568","admin");
//public $userarray = array("A21568","admin");
public function sendSmsBasedOnSubDisposition($kstychCall)
{
$users = $this->userarray;
if(in_array(Auth::user()->username , $users)){
//$users = $this->userarray;
//if(in_array(Auth::user()->username , $users)){
$msgText = $this->getSmsTemplate($kstychCall);
if( !empty($msgText) ) {
$msgText = $this->fillValuesInTemplate($msgText);
Log::info($msgText);
//Log::info($msgText);
$this->sendSmsRequest($kstychCall, $msgText);
}
}
//}
return;
}
public function sendSmsRequest($kstychCall, $msgText)
......@@ -47,7 +47,9 @@ class SmsController extends Controller
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
Log::info($response);
Log::useFiles(storage_path().'/logs/SMS_Messages.log');
Log::info("|".date('Y-m-d H:i:s', strtotime('+5 hours 30 minutes'))."|".$kstychCall['callnumber']."|".$msgText."|".$response);
//Log::info($response);
curl_close($ch);
} catch(Exception $e) {
Log::info($e->getMessage());
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!