这是因为laravel的缓存路径没有找到

laravel缓存文件路径是在 config/cache.php中设置,默认存在storage文件夹中

laravel 解决 Please provide a valid cache path 问题-LMLPHP

解决:

创建目录:

mkdir -p storage/app
mkdir -p storage/framework
mkdir -p storage/framework/views
mkdir -p storage/framework/cache
mkdir -p storage/framework/sessions

确保 storage 目录结构如下:

/storage
├── app
├── framework
│ ├── cache

│ ├── sessions
│ └── views
└──
logs
└── laravel.log

并且目录具有读写权限

chmod -R  storage

否则报错

laravel 解决 Please provide a valid cache path 问题-LMLPHP

05-22 19:44