Goutte icon indicating copy to clipboard operation
Goutte copied to clipboard

Class 'Goutte\Client' not found

Open theresiaSLV opened this issue 3 years ago • 1 comments

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

theresiaSLV avatar Jun 24 '21 02:06 theresiaSLV

Hi, have you added "use" before instance of class?

use Goutte\Client;

fabdelgado avatar Jun 30 '21 22:06 fabdelgado