Laravel: Class 'GuzzleHttp\Client' not found
Stefan Bogdanescu
Founder & Senior Architect · 2026-06-29
Title: Common Issues and Solutions for Laravel 'GuzzleHttp\Client' Not Found Error
Body:
A common issue encountered by developers using Laravel is the 'FatalErrorException' in MandrillTransport where the class 'GuzzleHttp\Client' is not found. This error can be confusing, especially if you have followed all the necessary steps as outlined in the documentation. In this comprehensive guide, we will discuss various reasons for this issue and provide solutions to help you resolve this error.
Ensure Composer Updates
The first step is ensuring that your project's package manager is up-to-date. Run the following commands in your Terminal to update Composer:composer self-updatecomposer update composer/composer
After updating, run:
composer require "guzzlehttp/guzzle": "~4.0"
Now recheck your composer.json file and ensure that you have added the correct dependency for guzzle http client as shown in the example above.
Check Require and Require-Dev Sections
Review your require, require-dev sections of your composer.json to confirm whether you've installed Guzzle correctly or not. If needed, run:composer require "illuminate/html": "^5.0"composer require "guzzlehttp/guzzle": "~4.0"
Also, check your installed package list to verify the presence of guzzle and its version by running:
composer outdated
Clear Composer Cache
Sometimes, the issue may be caused due to composer cache. Clear it before continuing:- Remove vendor directory (if present)
- Run
composer install --no-scripts --prefer-dist - Check if the issue still persists
Check Laravel Project Installation
In rare cases, this error might occur due to an incorrect Laravel installation or a conflict with your existing project's structure and dependencies. Ensure that you follow these steps:- Uninstall all the composer packages by running
composer remove --allin Terminal - Delete the vendor directory (if it exists)
- Run
composer installto re-install all dependencies - Check if the issue still persists
Upgrade Laravel Framework
If you have upgraded your Laravel framework version, ensure that all the dependencies are compatible with the new Laravel version. Sometimes, this may cause issues due to incompatibilities or missing references. To check compatibility:- Uninstall the current Laravel installation (
composer remove laravel/framework) - Delete the 'vendor', 'bootstrap/cache' and 'storage' directories
- Install the new Laravel version by running
composer create-project --prefer-dist laravel/laravel myapp - Verify if the issue still persists with the updated framework