<?php

namespace App\Providers;

use App\View\Composers\ConfigComposer;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        //
    }

    public function boot(): void
    {
        Paginator::useBootstrapFive();
        View::composer('*', ConfigComposer::class);

        if ($this->app->environment('production')) {
            URL::forceScheme('https');
        }
    }
}
