please provide a valid cache path.

Posted by w3diy - 5 months ago

Laravel Error: Please provide a valid cache path

Error : Please provide a valid cache path.

Best Solution: (Fixed) Laravel – Please Provide a Valid Cache Path

To solve this Laravel issue, you have to create simple PHP Laravel “framework” folder inside the storage folder. Inside the “framework” folder create 3 more folders as “sessions, views and cache” as below:

/path/to/laravel/storage/framework/

  1. sessions
  2. views
  3. cache

Using the Linux main terminal, use the following simple commands to create the folder structure.

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

We also need to PHP set permissions to allow Laravel to write data in this folder.

chmod -R 777 framework
chown -R www-data:www-data framework