How to stop Laravel 5 from caching configurations?

前端 未结 3 1036
逝去的感伤
逝去的感伤 2020-12-13 16:52

It is written in Laravel 5 documentation that php artisan config:cache stores all the app configuration into one single file which makes the application load fa

3条回答
  •  渐次进展
    2020-12-13 17:33

    As per the post here: https://github.com/laravel/framework/issues/2501

    "Change cache driver to array for the local environment."

    For me this involves adding CACHE_DRIVER=array to my .env file. This is then picked up by my config/cache.php file which includes the line: 'default' => env('CACHE_DRIVER', 'file'),

    Obviously you could change it directly in the config/cache.php but I'd prefer to use the .env file so I can disable it for development sites and enable for production.

提交回复
热议问题