编辑 .env 文件,追加一行:
ASSET_URL=https://你的域名
但是接口域名还是 http 的,所以在这个文件的 boot 方法里,
lsky-pro/app/Providers/AppServiceProvider.php
Lines 31 to 52 in 6d0631b
public function boot() | |
---|---|
{ | |
// 是否需要生成 env 文件 | |
if(! file_exists(base_path('.env'))) { | |
file_put_contents(base_path('.env'), file_get_contents(base_path('.env.example'))); | |
// 生成 key | |
Artisan::call('key:generate'); | |
} | |
// 如果已经安装程序,初始化一些配置 | |
if(file_exists(base_path('installed.lock'))) { | |
// 覆盖默认配置 |
第 32 行下面追加一行:
\Illuminate\Support\Facades\URL::forceScheme('https');