Files
star-erp/app/Providers/AppServiceProvider.php
sky121113 8e91f28ef4
All checks were successful
Koori-ERP-Deploy-System / deploy-demo (push) Has been skipped
Koori-ERP-Deploy-System / deploy-production (push) Successful in 59s
main
2026-01-06 13:26:40 +08:00

29 lines
542 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
// 如果是在正式環境,強制轉為 https
if (config('app.env') === 'production') {
URL::forceScheme('https');
}
}
}