Open theresiaSLV opened 3 years ago
public function handle() { $Client = new Client(); $scrawler = $client->request('GET', 'https://www.symfony.com/blog/'); $crawler->filter('h2 > a')->each(function ($node) { print $node->text()."\n"; }); }
Symfony\Component\Debug\Exception\FatalThrowableError : Class 'Goutte\Client' not found
Hi, have you added "use" before instance of class?
use Goutte\Client;
public function handle() { $Client = new Client();
$scrawler = $client->request('GET', 'https://www.symfony.com/blog/'); $crawler->filter('h2 > a')->each(function ($node) { print $node->text()."\n"; }); }
Symfony\Component\Debug\Exception\FatalThrowableError : Class 'Goutte\Client' not found