<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\View;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        //
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        // 🔹 Evita error de índice en MySQL (XAMPP)
        Schema::defaultStringLength(191);

        // 🔹 Zona horaria Perú
        date_default_timezone_set('America/Lima');

        // 🔹 Compartir moneda en todas las vistas
        View::share('moneda', 'S/.');
    }
}