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

1

5

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?

Cardoon answered 4/2, 2019 at 15:51 Comment(2)
can you share a picture of folder structure for folder layouts?Uvular
Did you tried this https://mcmap.net/q/150810/-laravel-showing-quot-failed-to-clear-cache-make-sure-you-have-the-appropriate-permissions-quot ?Koniology
M
18

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.

Millenarianism answered 4/2, 2019 at 16:29 Comment(1)
This is the right answer if you have a project that has been upgraded from a version prior to 5.7Carcajou

© 2022 - 2024 — McMap. All rights reserved.