new5tt / laravel-neditor
neditor for laravel 6.x
This package's canonical repository appears to be gone and the package has been frozen as a result.
dev-master
2020-04-25 18:21 UTC
Requires
- guzzlehttp/guzzle: ^6.5
This package is not auto-updated.
Last update: 2024-07-05 11:19:59 UTC
README
laravel-neditor
neditor for laravel 6.x.
参考
https://github.com/notadd/neditor
https://github.com/overtrue/laravel-ueditor
Installing
$ composer require newtimes/laravel-neditor -vvv
$ composer require summergeorge/ali-oss-storage
$ php artisan vendor:publish --provider="NewTimes\LaravelNeditor\NeditorServiceProvider"
阿里云OSS配置
filesystems.php
'oss' => [
'driver' => 'oss',
'access_id' => env("ALIYUN_ACCESSKEY_ID"),
'access_key' => env("ALIYUN_ACCESSKEY_SECRET"),
'bucket' => env("ALIYUN_OSS_BUCKET_NAME"),
'endpoint' => env("ALIYUN_OSS_ENDPOINT"), // OSS 外网节点或自定义外部域名
'cdnDomain' => env("ALIYUN_OSS_CDN_DOMAIN", ""), // 如果isCName为true, getUrl会判断cdnDomain是否设定来决定返回的url,如果cdnDomain未设置,则使用endpoint来生成url,否则使用cdn
'ssl' => env("ALIYUN_OSS_SSL", false), // true to use 'https://' and false to use 'http://'. default is false,
'isCName' => env("ALIYUN_OSS_IS_CNAME", false),// 是否使用自定义域名,true: 则Storage.url()会使用自定义的cdn或域名生成文件url, false: 则使用外部节点生成url
]
admin.php
原来'disk' => 'admin', 改成 'disk' => env('FILESYSTEM_DRIVER', 'public'),
添加下面一行到 config/app.php
中 providers
部分:
NewTimes\LaravelNeditor\NeditorServiceProvider::class,