Barryvdh\Queue\AsyncQueue::push PHP Method

push() public method

Push a new job onto the queue.
public push ( string $job, mixed $data = '', string | null $queue = null ) : integer
$job string
$data mixed
$queue string | null
return integer
    public function push($job, $data = '', $queue = null)
    {
        $id = parent::push($job, $data, $queue);
        $this->startProcess($id);
        return $id;
    }

Usage Example

 /**
  * Push a new job onto the queue.
  *
  * @param string $job
  * @param mixed $data
  * @param string|null $queue
  * @return int 
  * @static 
  */
 public static function push($job, $data = '', $queue = null)
 {
     return \Barryvdh\Queue\AsyncQueue::push($job, $data, $queue);
 }