src/Header.php
public function setLink($url, $as, $type = null, $crossorigin = false, $nopush = false) {
        $args = [
            sprintf('<%s>', $url),
            'rel=preload',
            'as='.$as
        ];
        if (!empty($type)) {
            $args[] = 'type='.$type;
        }
        if ($crossorigin) {
            $args[] = 'crossorigin';
        }
        if ($nopush) {
            $args[] = 'nopush';
        }
        return $this->set('Link', implode('; ', $args));
    }
public function setLink($url, $as, $type = null, $crossorigin = false, $nopush = false) {
        $args = [
            sprintf('<%s>', $url),
            'rel=preload',
            'as='.$as
        ];
        if (!empty($type)) {
            $args[] = 'type='.$type;
        }
        if ($crossorigin) {
            $args[] = 'crossorigin';
        }
        if ($nopush) {
            $args[] = 'nopush';
        }
        return $this->set('Link', implode('; ', $args));
    }
HTTP2 server push
@param $url
@param $as
@param null $type
@param bool $crossorigin
@param bool $nopush
@return Header