Spatie\Crawler\Crawler::getAllLinks PHP Method

    protected function getAllLinks($html)
    {
        $domCrawler = new DomCrawler($html);
        return collect($domCrawler->filterXpath('//a')->extract(['href']))->map(function ($url) {
            return Url::create($url);
        });
    }