applicant-site/app/Providers/AppServiceProvider.php

22 lines
383 B
PHP
Raw Permalink Normal View History

2024-01-10 12:57:24 +03:00
<?php
namespace App\Providers;
2024-02-16 15:59:29 +03:00
use Illuminate\Routing\UrlGenerator;
2024-01-10 12:57:24 +03:00
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function register(): void
{
//
}
2024-02-16 15:59:29 +03:00
public function boot(UrlGenerator $url): void
2024-01-10 12:57:24 +03:00
{
2024-02-16 15:59:29 +03:00
if (env('APP_ENV') == 'production') {
$url->forceScheme('https');
}
2024-01-10 12:57:24 +03:00
}
}