KevinvanSonsbeek
5 months ago
1171
1
Requests

Guzzle http request error laravel 58

Posted 5 months ago by KevinvanSonsbeek

I just made a clean laravel 5.8 project and installed guzzle using composer require guzzlehttp/guzzle~6.0.

When i try to perform a request using guzzle i get this error:

Class 'Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory' not found

This is the code in the controller:

<?php

namespace Modules\TestModule\Http\Controllers;

use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;
use Modules\TestModule\Entities\Callcenter;

class TestModuleController extends Controller
{

    public function getProfile(Callcenter $callcenter)
        {
$client = new Client();
            $res = $client->request('GET', 'http://google.com');

            return $res;
        }
}

Doing a composer dump-autoloaddidn't fix it either.

Please sign in or create an account to participate in this conversation.