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
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*/
|
|
|
|
public function register(): void
|
|
|
|
{
|
|
|
|
//
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
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
|
|
|
}
|
|
|
|
}
|