I'm having a problem with by project. I'm wrinting an application and in this app, I have also an API.
In this project, I have Redis as cache driver, as you can see in my .env file
BROADCAST_DRIVER=log CACHE_DRIVER=redis SESSION_DRIVER=file QUEUE_DRIVER=redis
When I use the web app, everything fine, but when I send some post to API, the request fails with the following error:
{ "message": "Class 'Predis\\Client' not found", "exception": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError", "file": "/home/vitor/Projects/AtomicSystems/AtomicTransport/vendor/laravel/framework/src/Illuminate/Redis/Connectors/PredisConnector.php", "line": 25}
What is intriguing me, is that if I change the cache driver to File, the API works normally.
I've figured out that is one of the default middlewares is throwing the error. More specifically the throttle
middleware. You can see my middleware config here:
$middlewareGroups = [ 'api' => [ 'throttle:60,1', 'bindings', ], ];
Someone know qhat could be causing this problem?
Thanks.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2z3ZbAA
via IFTTT
Aucun commentaire:
Enregistrer un commentaire