protected function withCreatePayloadHooks($queue, array $payload)
    {
        if (! empty(static::$createPayloadCallbacks)) {
            foreach (static::$createPayloadCallbacks as $callback) {
                $payload = array_merge($payload, call_user_func(
                    $callback, $this->getConnectionName(), $queue, $payload
                ));
            }
        }

        return $payload;
    }
protected function withCreatePayloadHooks($queue, array $payload)
    {
        if (! empty(static::$createPayloadCallbacks)) {
            foreach (static::$createPayloadCallbacks as $callback) {
                $payload = array_merge($payload, call_user_func(
                    $callback, $this->getConnectionName(), $queue, $payload
                ));
            }
        }

        return $payload;
    }
protected function withCreatePayloadHooks ( $ queue , array $ payload ) { if ( ! empty ( static :: $ createPayloadCallbacks ) ) { foreach ( static :: $ createPayloadCallbacks as $ callback ) { $ payload = array_merge ( $ payload , call_user_func ( $ callback , $ this -> getConnectionName ( ) , $ queue , $ payload ) ) ; } } return $ payload ; }
Create the given payload using any registered payload hooks.

@param  string  $queue
@param  array  $payload
@return array
Create the given payload using any registered payload hooks .