Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Class 'Goutte\Client' not found #443

Open
theresiaSLV opened this issue Jun 24, 2021 · 1 comment
Open

Class 'Goutte\Client' not found #443

theresiaSLV opened this issue Jun 24, 2021 · 1 comment

Comments

@theresiaSLV
Copy link

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

@fabdelgado
Copy link

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

use Goutte\Client;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants