Support the ongoing development of →
Configuration Cache Database
Last updated 3 months ago.

don't know your code but due to namespaces you may have to write:


and did you register Predis in your config/app ?

Last updated 7 years ago.

This error appears somewhere before my code.

at HandleExceptions->fatalExceptionFromError(array('type' => '1', 'message' => 'Class 'Predis\Client' not found', 'file' => '/vendor/laravel/framework/src/Illuminate/Redis/Database.php', 'line' => '58'

This string in config/app should work with Redis:


As far as I know there is no need to register it somehow else.. Documentatios says that I need to install it with composer and thats it.


Add "predis/predis": "[email protected]", to the "require" block in composer.json.


    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "laravel/framework": "5.0.*",
        "predis/predis": "[email protected]"


Last updated 7 years ago.

I get this error Class 'App\Http\Controllers\Predis\Client' not found on my Controller.
In the Controller I simply call

    $client = new Predis\Client();
    $client->set('foo', 'bar');
    $value = $client->get('foo');

and Predis is not recognized. Do I need to add something more after I did a composer require Predis?

Btw I did 'predis/predis' : '1.0' as well as 'predis/predis' : '[email protected]' AND I do have the Predis director in my vendor directory......

Last updated 6 years ago.

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

AnFox AnFox anfox Joined 9 Feb 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 - All rights reserved.