File size: 683 Bytes
50cf058 4f8c3bf 50cf058 4f8c3bf 50cf058 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<?php
namespace App\Providers;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\Vite;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
// Viteのプリフェッチ設定
Vite::prefetch(concurrency: 3);
// 環境がlocal以外なら強制的にHTTPSを使うURLを生成する
if (config('app.env') !== 'local') {
URL::forceScheme('https');
}
}
}
|