SimpleSoftwareIO\SMS\SMS::later PHP Метод

later() публичный Метод

Queues a message to be sent a later time.
public later ( integer $delay, string $view, array $data, Closure | string $callback, null | string $queue = null )
$delay integer The desired delay in seconds
$view string The desired view.
$data array An array of data to fill the view.
$callback Closure | string The callback to run on the Message class.
$queue null | string The desired queue to push the message to.
    public function later($delay, $view, $data, $callback, $queue = null)
    {
        $callback = $this->buildQueueCallable($callback);
        $this->queue->later($delay, 'sms@handleQueuedMessage', compact('view', 'data', 'callback'), $queue);
    }

Usage Example

Пример #1
0
 /**
  * Queues a message to be sent a later time.
  *
  * @param int $delay The desired delay in seconds
  * @param string $view The desired view.
  * @param array $data An array of data to fill the view.
  * @param \Closure|string $callback The callback to run on the Message class.
  * @param null|string $queue The desired queue to push the message to.
  * @return void 
  * @static 
  */
 public static function later($delay, $view, $data, $callback, $queue = null)
 {
     \SimpleSoftwareIO\SMS\SMS::later($delay, $view, $data, $callback, $queue);
 }