forked from wanglelecc/laracms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9ef9009
commit 389835c
Showing
3 changed files
with
354 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Str; | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Default Cache Store | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This option controls the default cache connection that gets used while | ||
| using this caching library. This connection is used when another is | ||
| not explicitly specified when executing a given caching function. | ||
| | ||
| Supported: "apc", "array", "database", "file", "memcached", "redis" | ||
| | ||
*/ | ||
|
||
'default' => env('CACHE_DRIVER', 'file'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Cache Stores | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may define all of the cache "stores" for your application as | ||
| well as their drivers. You may even define multiple stores for the | ||
| same cache driver to group types of items stored in your caches. | ||
| | ||
*/ | ||
|
||
'stores' => [ | ||
|
||
'apc' => [ | ||
'driver' => 'apc', | ||
], | ||
|
||
'array' => [ | ||
'driver' => 'array', | ||
], | ||
|
||
'database' => [ | ||
'driver' => 'database', | ||
'table' => 'cache', | ||
'connection' => null, | ||
], | ||
|
||
'file' => [ | ||
'driver' => 'file', | ||
'path' => storage_path('framework/cache/data'), | ||
], | ||
|
||
'memcached' => [ | ||
'driver' => 'memcached', | ||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), | ||
'sasl' => [ | ||
env('MEMCACHED_USERNAME'), | ||
env('MEMCACHED_PASSWORD'), | ||
], | ||
'options' => [ | ||
// Memcached::OPT_CONNECT_TIMEOUT => 2000, | ||
], | ||
'servers' => [ | ||
[ | ||
'host' => env('MEMCACHED_HOST', '127.0.0.1'), | ||
'port' => env('MEMCACHED_PORT', 11211), | ||
'weight' => 100, | ||
], | ||
], | ||
], | ||
|
||
'redis' => [ | ||
'driver' => 'redis', | ||
'connection' => 'cache', | ||
], | ||
|
||
], | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Cache Key Prefix | ||
|-------------------------------------------------------------------------- | ||
| | ||
| When utilizing a RAM based store such as APC or Memcached, there might | ||
| be other applications utilizing the same cache. So, we'll specify a | ||
| value to get prefixed to all our keys so we can avoid collisions. | ||
| | ||
*/ | ||
|
||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| 自定义内容缓存时间,单位:分钟 | ||
|-------------------------------------------------------------------------- | ||
| | ||
| When utilizing a RAM based store such as APC or Memcached, there might | ||
| be other applications utilizing the same cache. So, we'll specify a | ||
| value to get prefixed to all our keys so we can avoid collisions. | ||
| | ||
*/ | ||
'expired' => [ | ||
|
||
'block' => 10, | ||
'navigation' => 10, | ||
'template' => 10, | ||
'settings' => 10, | ||
|
||
'page' => 10, | ||
'article' => 10, | ||
'category' => 10, | ||
'product' => 10, | ||
|
||
], | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Default Filesystem Disk | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may specify the default filesystem disk that should be used | ||
| by the framework. The "local" disk, as well as a variety of cloud | ||
| based disks are available to your application. Just store away! | ||
| | ||
*/ | ||
|
||
'default' => env('FILESYSTEM_DRIVER', 'local'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Default Cloud Filesystem Disk | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Many applications store files both locally and in the cloud. For this | ||
| reason, you may specify a default "cloud" driver here. This driver | ||
| will be bound as the Cloud disk implementation in the container. | ||
| | ||
*/ | ||
|
||
'cloud' => env('FILESYSTEM_CLOUD', 's3'), | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Filesystem Disks | ||
|-------------------------------------------------------------------------- | ||
| | ||
| Here you may configure as many filesystem "disks" as you wish, and you | ||
| may even configure multiple disks of the same driver. Defaults have | ||
| been setup for each driver as an example of the required options. | ||
| | ||
| Supported Drivers: "local", "ftp", "s3", "rackspace" | ||
| | ||
*/ | ||
|
||
'disks' => [ | ||
|
||
'local' => [ | ||
'driver' => 'local', | ||
'root' => storage_path('app'), | ||
], | ||
|
||
'public' => [ | ||
'driver' => 'local', | ||
'root' => storage_path('app/public'), | ||
'url' => env('APP_URL').'/storage', | ||
'visibility' => 'public', | ||
], | ||
|
||
's3' => [ | ||
'driver' => 's3', | ||
'key' => env('AWS_ACCESS_KEY_ID'), | ||
'secret' => env('AWS_SECRET_ACCESS_KEY'), | ||
'region' => env('AWS_DEFAULT_REGION'), | ||
'bucket' => env('AWS_BUCKET'), | ||
'url' => env('AWS_URL'), | ||
], | ||
|
||
'aliyun' => [ | ||
'driver' => 'aliyun', | ||
'access_key_id' => env('ALIYUN_ACCESS_KEY_ID','your id'), | ||
'access_key_secret' => env('ALIYUN_ACCESS_KEY_SECRET','your key'), | ||
'oss_bucket' => env('ALIYUN_OSS_BUCKET','your bucket'), | ||
'oss_endpoint' => env('ALIYUN_OSS_ENDPOINT',''), // 生成环境若使用的阿里云服务,可配置内网地址,上传速度更快 | ||
'oss_prefix' => env('ALIYUN_OSS_PREFIX', ''), // optional | ||
'oss_url' => env('ALIYUN_OSS_URL', ''), // optional // https://<bucket>.<endpoint>/<filename> | ||
|
||
'vod_region_id' => env('ALIYUN_VOD_REGION_ID', ''), | ||
'vod_upload_url' => env('ALIYUN_VOD_URLOAD_URL', ''), | ||
], | ||
|
||
'azure' => [ | ||
'driver' => 'azure', | ||
'name' => env('AZURE_STORAGE_NAME', 'azure storage name'), | ||
'key' => env('AZURE_STORAGE_KEY', 'azure storage key'), | ||
'container' => env('AZURE_STORAGE_CONTAINER', 'azure storage container'), | ||
// $url = 'https://' . config('filesystems.disks.azure.name'). '.blob.core.windows.net/' . config('filesystems.disks.azure.container') . '/' . $filename; | ||
], | ||
|
||
], | ||
|
||
// 配置的允许大小不能超过 PHP.ini 限制. 默认PHP POST 请求允许最大8MB,File Upload 最大 2MB | ||
'uploader' => [ | ||
|
||
'folder' => ['avatar', 'article', 'blog', 'page', 'website', 'slide', 'link', 'video', 'annex', 'voice', 'navigation'], | ||
|
||
// 图片 | ||
'image' => [ | ||
'size_limit' => 5242880, // 单位:字节,默认:5MB | ||
'allowed_ext' => ["png", "jpg", "gif", 'jpeg', 'bmp'], | ||
], | ||
|
||
// 附件 | ||
'annex' => [ | ||
'size_limit' => 204857600000, // 单位:字节,默认:5MB (5242880 B) // 104857600 | ||
'allowed_ext' => ['zip','rar','7z','gz'], | ||
], | ||
|
||
// 文件 | ||
'file' => [ | ||
'size_limit' => 5242880, // 单位:字节,默认:5MB | ||
'allowed_ext' => ['pdf','doc','docx','xls','xlsx','ppt','pptx'], | ||
], | ||
|
||
// 音频 | ||
'voice' => [ | ||
'size_limit' => 5242880, // 单位:字节,默认:5MB | ||
'allowed_ext' => ['mp3','wmv'], | ||
], | ||
|
||
// 视频 | ||
'video' => [ | ||
'size_limit' => 5242880, // 单位:字节,默认:5MB | ||
'allowed_ext' => ['mp4'], | ||
], | ||
|
||
// Ueditor 配置 | ||
'ueditor' => [ | ||
"imageActionName" => "uploadimage", | ||
"imageFieldName" => "upload_file", | ||
"imageMaxSize" => 5242880, | ||
"imageAllowFiles" => [".png", ".jpg", ".jpeg", ".gif", ".bmp"], | ||
"imageCompressEnable" => true, | ||
"imageCompressBorder" => 1600, | ||
"imageInsertAlign" => "none", | ||
"imageUrlPrefix" => "", | ||
"imagePathFormat" => "", | ||
"imageManagerUrlPrefix" => "", | ||
|
||
"imageManagerActionName" => "listimage", | ||
"imageManagerListSize" => 20, | ||
"fileManagerListSize" => 20, | ||
|
||
"snapscreenActionName" => "uploadimage", | ||
"snapscreenInsertAlign" => "none", | ||
"snapscreenUrlPrefix" => "", | ||
"snapscreenPathFormat" => "", | ||
|
||
"videoActionName" => "uploadvideo", | ||
"videoFieldName" => "upload_file", | ||
"videoMaxSize" => 5242880, | ||
"videoAllowFiles" => [".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], | ||
"videoUrlPrefix" => "", | ||
"videoPathFormat" => "", | ||
|
||
"catcherLocalDomain" => ["127.0.0.1", "localhost", "img.baidu.com"], | ||
"catcherActionName" => "catchimage", | ||
"catcherFieldName" => "source", | ||
"catcherUrlPrefix" => "", | ||
"catcherMaxSize" => 2048000, | ||
"catcherAllowFiles" => [".png", ".jpg", ".jpeg", ".gif", ".bmp"], | ||
], | ||
|
||
], | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
|
||
return [ | ||
|
||
/* | ||
|-------------------------------------------------------------------------- | ||
| Third Party Services | ||
|-------------------------------------------------------------------------- | ||
| | ||
| This file is for storing the credentials for third party services such | ||
| as Stripe, Mailgun, SparkPost and others. This file provides a sane | ||
| default location for this type of information, allowing packages | ||
| to have a conventional place to find your various credentials. | ||
| | ||
*/ | ||
|
||
'mailgun' => [ | ||
'domain' => env('MAILGUN_DOMAIN'), | ||
'secret' => env('MAILGUN_SECRET'), | ||
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'), | ||
], | ||
|
||
'ses' => [ | ||
'key' => env('SES_KEY'), | ||
'secret' => env('SES_SECRET'), | ||
'region' => env('SES_REGION', 'us-east-1'), | ||
], | ||
|
||
'sparkpost' => [ | ||
'secret' => env('SPARKPOST_SECRET'), | ||
], | ||
|
||
'stripe' => [ | ||
'model' => Wanglelecc\Laracms\Models\User::class, | ||
'key' => env('STRIPE_KEY'), | ||
'secret' => env('STRIPE_SECRET'), | ||
], | ||
|
||
'baidu_translate' => [ | ||
'appid' => env('BAIDU_TRANSLATE_APPID'), | ||
'key' => env('BAIDU_TRANSLATE_KEY'), | ||
], | ||
|
||
'weixin' => [ | ||
'client_id' => env('WEIXIN_KEY'), | ||
'client_secret' => env('WEIXIN_SECRET'), | ||
'redirect' => env('WEIXIN_REDIRECT_URI'), | ||
], | ||
|
||
'weixinweb' => [ | ||
'client_id' => env('WEIXINWEB_KEY'), | ||
'client_secret' => env('WEIXINWEB_SECRET'), | ||
'redirect' => env('WEIXINWEB_REDIRECT_URI'), | ||
], | ||
|
||
'qq' => [ | ||
'client_id' => env('QQ_KEY'), | ||
'client_secret' => env('QQ_SECRET'), | ||
'redirect' => env('QQ_REDIRECT_URI'), | ||
], | ||
|
||
'weibo' => [ | ||
'client_id' => env('WEIBO_KEY'), | ||
'client_secret' => env('WEIBO_SECRET'), | ||
'redirect' => env('WEIBO_REDIRECT_URI'), | ||
], | ||
|
||
'github' => [ | ||
'client_id' => env('GITHUB_KEY'), | ||
'client_secret' => env('GITHUB_SECRET'), | ||
'redirect' => env('GITHUB_REDIRECT_URI'), | ||
], | ||
]; |