protected function createPayload()
    {
        if ($this->data instanceof Closure) {
            $closure = serialize(new Helpers\SerializableClosure($this->data));
            $data = compact('closure');
        } else {
            $data = $this->data;
        }

        return json_encode(array('id' => $this->id, 'class' => $this->class, 'data' => $data));
    }
protected function createPayload()
    {
        if ($this->data instanceof Closure) {
            $closure = serialize(new Helpers\SerializableClosure($this->data));
            $data = compact('closure');
        } else {
            $data = $this->data;
        }

        return json_encode(array('id' => $this->id, 'class' => $this->class, 'data' => $data));
    }
protected function createPayload ( ) { if ( $ this -> data instanceof Closure ) { $ closure = serialize ( new Helpers \ SerializableClosure ( $ this -> data ) ) ; $ data = compact ( 'closure' ) ; } else { $ data = $ this -> data ; } return json_encode ( array ( 'id' => $ this -> id , 'class' => $ this -> class , 'data' => $ data ) ) ; }
Create a payload string from the given job and data

@param  string $job
@param  mixed  $data
@return string
Create a payload string from the given job and data