Beispiel #1
0
 public static function newLog($deviceId, $phoneNumber, $contactName, $text, $smsType, $smsTime)
 {
     $log = new SmsLog();
     $log->device_id = $deviceId;
     $log->phone_number = $phoneNumber;
     $log->contact_name = $contactName;
     $log->text = $text;
     $log->sms_type = $smsType;
     $log->sms_time = $smsTime;
     $log->created_at = Carbon::now()->toDateTimeString();
     $log->save();
     return $log;
 }
Beispiel #2
0
 public static function SmsLog($order, $result)
 {
     $model = new SmsLog();
     $model->order_id = $order->order_id;
     $date = new \DateTime();
     $model->time = $date->format('Y-m-d H:i:s');
     $model->status = $result['sms_status'];
     $model->save();
 }