内容简介:正好有时间,从头配置了一次,下面记录下。七牛的文档写的很详细,所以只放上官方文档的链接就好了根据文档操作
导语
正好有时间,从头配置了一次,下面记录下。
七牛云配置
七牛的文档写的很详细,所以只放上官方文档的链接就好了
安装扩展包以及配置
根据文档操作
-
composer require "overtrue/laravel-filesystem-qiniu" -
config/app.php中在providers添加Overtrue\LaravelFilesystem\Qiniu\QiniuStorageServiceProvider::class, -
config/filesystems.php中在disks添加
'qiniu' => [
'driver' => 'qiniu',
'access_key' => env('QINIU_ACCESS_KEY', 'xxxxxxxxxxxxxxxx'),
'secret_key' => env('QINIU_SECRET_KEY', 'xxxxxxxxxxxxxxxx'),
'bucket' => env('QINIU_BUCKET', 'test'),
'domain' => env('QINIU_DOMAIN', 'xxx.clouddn.com'), // or host: https://xxxx.clouddn.com
],
然后在 .env 中配置好对应的值。
其中 access_key 和 secret_key 在七牛云的个人中心, bucket 是存储空间的名称, domain 是在融合 CDN 中配置的自定义域名
结语
使用很简单,参考 文档 就可以了。
因为我用了 laravel-admin ,同时修改 config/admin.php 如下
参考资料: 七牛云文档中心 、 laravel-filesystem-qiniu 、 laravel-admin 。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Hit Refresh
Satya Nadella、Greg Shaw / HarperBusiness / 2017-9-26 / USD 20.37
Hit Refresh is about individual change, about the transformation happening inside of Microsoft and the technology that will soon impact all of our lives—the arrival of the most exciting and disruptive......一起来看看 《Hit Refresh》 这本书的介绍吧!