I upgraded my app from Laravel 5.6 to 5.7 by following official upgrade guideline.
After upgrade production crashed, and upon running php artisan cache:clear
artisan threw the following error:
Failed to clear cache. Make sure you have the appropriate permissions.
Some googling, and I figured out why it was happening.
If you install laravel now, you will get
storage/framework/cache/data
directory automatically so you don’t have to create it. They leave this directory to allow the filesystem to cache.
That’s mean when upgrading system doesn’t find storage/framework/cache/data
, by creating this folder with correct permissions problem will be solved.
Once folder is created run php artisan cache:clear
That’s all.