Please Provide a Valid Cache Path Laravel




Hi Dev,

Few days ago i am clone my old project and then install composer. Then i also created .env file and make virtual host of my laravel application but i got following error.

please provide a valid cache path

I again composer update and also give permission to storage folder but nothing result.So I am copy this error paste into google. I don't know but i make gitignore storage/framework so, what you have to do if you found this error.

I solved the problem when I created "framework" folder inside storage folder and its subfolders sessions, views and cache.

Here, I will give three solution for this error.So Let's see the solution as bellow.

Solution 1

You have need to create storage folder inside "framework" folder. Please Follow this step:

cd storage/

mkdir -p framework/{sessions,views,cache}

You can create folder after give the permission for the write data in this directory.

cd storage/

chmod -R 775 framework

chown -R www-data:www-data framework

Solution 2

In this solution you will create storage folder in framework folder and framework folder in create bellow three directory.




You can create cache folder in data directory.

All folder created, thenafter You can clear cache using bellow artisan command:

php artisan cache:clear

Solution 3

You have need to create storage folder inside "framework" folder using bellow command to create session, view and cache in data:

sudo mkdir storage/framework

sudo mkdir storage/framework/sessions

sudo mkdir storage/framework/views

sudo mkdir storage/framework/cache

sudo mkdir storage/framework/cache/data

Run successfully above command then after give the permission to storage folder using bellow command.

sudo chmod -R 777 storage

It will help you...

#Laravel 7


#Laravel 6