sprintcar78a
sprintcar78a

Reputation: 199

Laravel 5.2 - Class 'GuzzleHttp\Client' not found, on live server only

I have my config/mail 'driver' set to mandrill, host, port, etc. including in services.php mandrill secret set.

Sending Mail works fine locally, but on the live server I get:

Class 'GuzzleHttp\Client' not found

I have tried "guzzlehttp/guzzle": "~5.3|~6.0", and then back to "guzzlehttp/guzzle": "~4.0", no luck. I have done composer update, and dump-autoload still no luck on my live server. Been through every other associated Stackoverflow question and still can't resolve.

Upvotes: 2

Views: 2889

Answers (3)

bitbuoy
bitbuoy

Reputation: 393

Error ? the library GuzzleHttp (which is a Simple interface for building query strings, POST requests, streaming large uploads, streaming large downloads, using HTTP cookies, uploading JSON data ) is either missing or mis-configured.

Solution : run the following command on your terminal(root folder):

composer require guzzlehttp/guzzle:^6.5

Upvotes: 0

German
German

Reputation: 11

Please follow these simple steps:

First: Place this on top of your class

use Guzzlehttp\Client;

Second: Inside your function, instead of using

$client = new Client();

use

$client = new \GuzzleHttp\Client();

reference:

http://docs.guzzlephp.org/en/latest/quickstart.html

Upvotes: 1

Moses Nandwa
Moses Nandwa

Reputation: 179

try composer require guzzlehttp/guzzle without specifying the version. Worked for me

Upvotes: 0

Related Questions