protected function removePageQueryFromUrl($url)
    {
        $parts = parse_url($url);

        $query = preg_replace('#page=\d+&?#i', '', array_get($parts, 'query', ''));

        return array_get($parts, 'path') . ($query ? '?' . $query : null);
    }
protected function removePageQueryFromUrl($url)
    {
        $parts = parse_url($url);

        $query = preg_replace('#page=\d+&?#i', '', array_get($parts, 'query', ''));

        return array_get($parts, 'path') . ($query ? '?' . $query : null);
    }
protected function removePageQueryFromUrl ( $ url ) { $ parts = parse_url ( $ url ) ; $ query = preg_replace ( '#page=\d+&?#i' , '' , array_get ( $ parts , 'query' , '' ) ) ; return array_get ( $ parts , 'path' ) . ( $ query ? '?' . $ query : null ) ; }
Removes the page query parameter from a full URL.

@param string $url
@return string
Removes the page query parameter from a full URL .