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?

halfer
  • 19,824
  • 17
  • 99
  • 186
code-8
  • 54,650
  • 106
  • 352
  • 604

1 Answers1

15

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.

gere
  • 1,600
  • 1
  • 12
  • 19
  • 1
    This is the right answer if you have a project that has been upgraded from a version prior to 5.7 – fignet Apr 11 '22 at 19:23