#[1]gnikyt feed [2]gnikyt Code ramblings. Setting up Lumen with Redis /* Nov 19, 2017 — 1.2KB */ This is more of an extension of my previous post “Setting Up Lumen + Mail”. I wanted to take it a step further and show the basic setup for getting Redis to work, so you can queue not only mail, but jobs. First, run composer require illuminate/redis:5.5 to grab the Redis components. Next, open app/Providers/AppServiceProvider.php and add the following to the register method: app->configure('database'); // Enable queues $this->app->make('queue'); Next, create config/database.php and add the following: [ 'client' => 'predis', 'default' => [ 'host' => env('REDIS_HOST', '127.0.0.1'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), 'database' => 0 ] ] ]; Don’t forget to set up all your environment variables for Redis, as well, to enable Redis for job processing and cache, set the following environment variables: CACHE_DRIVER=redis QUEUE_DRIVER=redis That’s it! You can now queue mail or process jobs. [3]MD | [4]TXT | [5]CC-4.0 This post is 7 years old and may contain outdated information. __________________________________________________________________ [6]Ty King Ty King A self-taught, seasoned, and versatile developer from Newfoundland. Crafting innovative solutions with care and expertise. [7]Github [8]About Me [9]CV [10]RSS * * * * * * * * * * References Visible links: 1. /rss.xml 2. / 3. /setting-up-lumen-with-redis/index.md 4. /setting-up-lumen-with-redis/index.txt 5. https://creativecommons.org/licenses/by/4.0/ 6. /about 7. https://github.com/gnikyt 8. /about 9. /assets/files/cv.pdf 10. /rss.xml Hidden links: 12. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb1-1 13. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb1-2 14. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb1-3 15. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb1-4 16. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb1-5 17. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb1-6 18. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb1-7 19. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb1-8 20. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-1 21. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-2 22. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-3 23. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-4 24. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-5 25. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-6 26. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-7 27. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-8 28. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-9 29. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-10 30. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-11 31. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-12 32. localhost/tmp/lynxXXXXMGLv79/L3275355-8024TMP.html#cb2-13