1. Laravel 5 dynamic setting cache engine
Copy code The code is as follows:
Config::set('cache.default','redis');
var_dump( Config::get('cache.default') );
Config::set('cache.default','memcached');
var_dump( Config::get('cache.default') );
2. In Laravel 5, it has the same effect as use IlluminateSupportFacades
3. The storage directory cannot be written and read under Laravel 5 Linux
Copy code The code is as follows:
#chown -R www:www storage //Note: www www is the user and group of nginx. View it in nginx.conf
#If it still doesn’t work
#php artisan cache:clear Clear application cache
Let’s stop here first. This article will continue to be updated in the future. I hope you all like it.