API Rest with Laravel 5.6 Passport Authentication — Send Notifications with Queues on Redis (Part 5)
We learning how to send Notifications with management to queues using Redis. In this tutorial we will use the Notifications created previously in the previous tutorials.
— Install Redis
— Config Enviroment
— Install Redis Driver
— Run the Queue Worker
— Install andConfigure supervisor
Step 1 Install Redis
In first step, we install Redis for this I let you two great tutorials for MacOsx and Linux.
Ubuntu 16.04
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04
MacOsx
https://medium.com/@petehouston/install-and-config-redis-on-mac-os-x-via-homebrew-eb8df9a4f298
Step 2 Config Enviroment
In this step we will config our .env
file, add redis into QUEUE_DRIVER variable also change the REDIS_ variables, finally config the e-mail service. I recomend Mailtrap to test.
QUEUE_DRIVER=redisREDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379