Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory
You should typically run the php artisan config:cache
command as part of your production deployment routine. As a solution to your problem, I suggest you recreate the cache file, for faster configuration loading.
To do this, run the following Artisan commands on your command line
php artisan cache:clear
php artisan config:cache
You can programmatically execute the command by adding the following to your routes:
Route::get('/clear-cache', function() { $exitCode = Artisan::call('cache:clear'); $exitCode = Artisan::call('config:cache'); return 'DONE'; //Return anything});
And then call the clear-cache
route from your browser.
I hope this is helpful.