Spatie\Crawler\Crawler::startCrawling PHP Method

startCrawling() public method

public startCrawling ( Url | string $baseUrl )
$baseUrl Url | string
    public function startCrawling($baseUrl)
    {
        if (!$baseUrl instanceof Url) {
            $baseUrl = Url::create($baseUrl);
        }
        $this->baseUrl = $baseUrl;
        $crawlUrl = CrawlUrl::create($baseUrl);
        $this->crawlQueue->add($crawlUrl);
        $this->startCrawlingQueue();
        $this->crawlObserver->finishedCrawling();
    }