Laravel showing "Failed to clear cache. Make sure you have the appropriate permissions"
Solution 1:
If the data
directory doesn't exist under (storage/framework/cache/data
), then you will have this error.
This data
directory doesn't exist by default on a fresh/new installation.
Creating the data
directory manually at (storage/framework/cache
) should fix this issue.
Solution 2:
Try deleting these cached files under bootstrap folder:
/bootstrap/cache/packages.php
/bootstrap/cache/services.php
/bootstrap/cache/config.php
Then run php artisan cache:clear
Solution 3:
Calling
php artisan config:cache
before
php artisan cache:clear
fixed the issue.
Solution 4:
Just only add folder named data
in storage/framework/cache/
and try:
php artisan cache:clear