HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/dev-telemedicina.teky.com.co/app/Http/Controllers/OneSignalController.php
<?php

namespace Telemedicina\Http\Controllers;

use Illuminate\Http\Request;
use OneSignal;

class OneSignalController extends Controller
{
    /**
    * * Envio de notificacion con destino absolutamente todos los usuarios registrados en el app de OneSignal
    * @param $message - Mensaje a ser enviado
    * @param $url - URL que redirecciona la notificacion
    * @param $data - Datos en segundo plano enviados junto a la notificacion
    * @param $buttons - Botones incluidos en la notificacion aplica con ciertas restricciones según version iOS y Android
    * @param $schedule - Fecha y hora de programación de la notificacion formatos posibles:
    * "Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)"
    * "September 24th 2015, 2:00:00 pm UTC-07:00"
    * "2015-09-24 14:00:00 GMT-0700"
    * "Sept 24 2015 14:00:00 GMT-0700"
    * "Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)"
    * @param $typeTarget - U : USER D : DELIVERY
     */
    public static function sendToAll($message, $url, $data, $buttons, $schedule, $typeTarget){
        OneSignal::sendNotificationToAll($message, $url = $url, $data = $data, $buttons = $buttons, $schedule = $schedule);
    }

    /**
    * * Envio de notificacion con destino a un usuario según su Player ID.
    * @param $message - Mensaje a ser enviado
    * @param $idOneSignal - Player ID asignado por la palataforma de OneSignal.
    * @param $url - URL que redirecciona la notificacion
    * @param $data - Datos en segundo plano enviados junto a la notificacion
    * @param $buttons - Botones incluidos en la notificacion aplica con ciertas restricciones según version iOS y Android
    * @param $schedule - Fecha y hora de programación de la notificacion formatos posibles:
    *
    * "Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)"
    * "September 24th 2015, 2:00:00 pm UTC-07:00"
    * "2015-09-24 14:00:00 GMT-0700"
    * "Sept 24 2015 14:00:00 GMT-0700"
    * "Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)"
    * @param $typeTarget - U : USER D : DELIVERY
     */
    public static function sendToUser($message, $idOneSignal, $url, $data, $buttons, $schedule, $typeTarget){
        OneSignal::sendNotificationToUser($message, $idOneSignal, $url = $url, $data = $data, $buttons = $buttons, $schedule = $schedule);
    }

    /**
    * * Envio de notificacion con destino un segmento, el cual debe existir en la plataforma de OneSignal.
    * @param $message - Mensaje a ser enviado
    * @param $segment - Segmento, el cual debe estar creado en la plataforma de OneSignal.
    * @param $url - URL que redirecciona la notificacion
    * @param $data - Datos en segundo plano enviados junto a la notificacion
    * @param $buttons - Botones incluidos en la notificacion aplica con ciertas restricciones según version iOS y Android
    * @param $schedule - Fecha y hora de programación de la notificacion formatos posibles:
    *
    * "Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)"
    * "September 24th 2015, 2:00:00 pm UTC-07:00"
    * "2015-09-24 14:00:00 GMT-0700"
    * "Sept 24 2015 14:00:00 GMT-0700"
    * "Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)"
    * @param $typeTarget - U : USER D : DELIVERY
     */
    public static function sendToSegments($message, $segment, $url, $data, $buttons, $schedule, $typeTarget){
        OneSignal::sendNotificationToSegment($message, $segment, $url = $url, $data = $data, $buttons = $buttons, $schedule = $schedule);
    }

    /**
    * * Envio de notificacion con destino a las tags indicadas, las cuales deben existir en la plataforma de OneSignal.
    * @param $message - Mensaje a ser enviado
    * @param $tags - TAGS, etiquetas que deben estar marcadas en el usuario. Array ( ['key' => 'val_key1', 'relation' => '=', 'value' => 'val_value1' ], ['key' => 'val_key2', 'relation' => '=', 'value' => 'val_value2' ])
    * @param $url - URL que redirecciona la notificacion
    * @param $data - Datos en segundo plano enviados junto a la notificacion
    * @param $buttons - Botones incluidos en la notificacion aplica con ciertas restricciones según version iOS y Android
    * @param $schedule - Fecha y hora de programación de la notificacion formatos posibles:
    *
    * "Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)"
    * "September 24th 2015, 2:00:00 pm UTC-07:00"
    * "2015-09-24 14:00:00 GMT-0700"
    * "Sept 24 2015 14:00:00 GMT-0700"
    * "Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)"
    * @param $typeTarget - U : USER D : DELIVERY
     */
    public static function sendToTags($message, $tags, $url, $data, $buttons, $schedule, $typeTarget){
        OneSignal::sendNotificationUsingTags($message, $tags, $url = $url, $data = $data, $buttons = $buttons, $schedule = $schedule);
    }
}