src/Job.php
public static function createFromPayload(array $payload)
    {
        $job = $payload['job'];
        $data = $payload['data'];

        unset($payload['job'], $payload['data']);

        return new static($job, $data, [], $payload);
    }
public static function createFromPayload(array $payload)
    {
        $job = $payload['job'];
        $data = $payload['data'];

        unset($payload['job'], $payload['data']);

        return new static($job, $data, [], $payload);
    }
public static function createFromPayload ( array $ payload ) { $ job = $ payload [ 'job' ] ; $ data = $ payload [ 'data' ] ; unset ( $ payload [ 'job' ] , $ payload [ 'data' ] ) ; return new static ( $ job , $ data , [ ] , $ payload ) ; }
Creates a new Job from payload

@param [] $payload

@return self
Creates a new Job from payload