<?php

namespace App\Providers;

use Carbon\Carbon;
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()
    {
        // Set locale Carbon secara global ke Indonesia
        Carbon::setLocale('id');

        // Opsional: Set timezone jika diperlukan
        date_default_timezone_set('Asia/Jakarta');
        
        if (config('app.env') === 'production') {
            URL::forceScheme('https');
        }
    }
}
