安装composer扩展包
composer require death_satan/think-qiniu-storage -vvv
composer require "overtrue/laravel-filesystem-qiniu" -vvv
项目config目录下的filesystem.php文件下增加七牛云的配置
return [
// 默认磁盘
'default' => env('filesystem.driver', 'local'),
// 磁盘列表
'disks' => [
'local' => [
'type' => 'local',
'root' => app()->getRuntimePath() . 'storage',
],
'public' => [
// 磁盘类型
'type' => 'local',
// 磁盘路径
'root' => app()->getRootPath() . 'public/storage',
// 磁盘路径对应的外部URL路径
'url' => '/storage',
// 可见性
'visibility' => 'publ