code-8
code-8

Reputation: 58662

"Failed to clear cache. Make sure you have the appropriate permissions" in Laravel 5.7

I think I am facing cache issue on Laravel

I have the file

I kept getting

View [layouts.fe.wedding-us.index] not found.

I've tried clear the cache

composer dumpauto
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover
Discovered Package: nesbot/carbon
Discovered Package: laravel/slack-notification-channel
Discovered Package: laravel/nexmo-notification-channel
Discovered Package: laravelcollective/remote
Discovered Package: htmlmin/htmlmin
Discovered Package: intervention/image
Discovered Package: laravelcollective/html
Package manifest generated successfully.

php artisan view:clear && php artisan cache:clear
Compiled views cleared!
Failed to clear cache. Make sure you have the appropriate permissions.

but I got

Failed to clear cache. Make sure you have the appropriate permissions.

Not sure why it complaining about permission since I ran this command to allow all already

sudo chmod -R 777 storage/ bootstrap/

How can I go about fixing this?

Upvotes: 5

Views: 13969

Answers (1)

gere
gere

Reputation: 1730

Did you recently upgrade from a previous Laravel version? The Failed to clear cache. Make sure you have the appropriate permissions. may be caused by the missing folder storage/framework/cache/data. You can create it manually with:

mkdir -p storage/framework/cache/data

Check the Cache paragraph in the Upgrade to 5.7 guide for further details.

Upvotes: 18

Related Questions