Spatie\Crawler\Crawler::create PHP Method

create() public static method

public static create ( ) : static
return static
    public static function create()
    {
        $client = new Client([RequestOptions::ALLOW_REDIRECTS => false, RequestOptions::COOKIES => true]);
        return new static($client);
    }

Same methods

Crawler::create ( array $clientOptions = [] ) : static

Usage Example

 public function handle()
 {
     Crawler::create()->setCrawlProfile($this->getProfile())->setCrawlObserver($this->getReporter())->startCrawling($this->getUrlToBeCrawled());
     $this->info('All done!');
 }
All Usage Examples Of Spatie\Crawler\Crawler::create