I want to using Redis in laravel 5.2 however, I'm getting error such a Class 'Predis\Client' not found, How I can solve it.
相关问题
- Laravel Option Select - Default Issue
- How to install an extension to TYPO3 using compose
- Laravel 5.1 MethodNotAllowedHttpException on store
- Getting Redis Master address from Sentinel C#
- Laravel - Implicit route model binding with soft d
Btw, if you are using laravel workers, with ubuntu supervisor and this error will not dissappear even after you did
Then remember kids, that supervisor caches all your php code, once you boot it. So installing predis after you booted supervisor workers (https://laravel.com/docs/5.6/queues#supervisor-configuration), will not make a difference, until you do
and then start it again
I've been stuck on this for an hour or two, on 3 projects in the last year.
Write in console in project folder:
And thats all.
Go to the folder where you have downloaded the redis and run this command:
Go to your project directory and install composer:
composer require predis/predis
Go to your .env file and add Queue driver:
Mail::queue()
to send mail via queue. See Doc.And in your terminal run:
to send.
we have add composer.json file "predis/predis": "~1.0" help working fine.
Running
composer dump
after installing predis/predis package might be necessaryYou need to add
predis/predis
intocomposer.json
for your project. Reference: https://laravel.com/docs/5.2/redis#introduction