<?php

namespace App\Providers;
use Illuminate\Support\Facades\View;

use Illuminate\Support\ServiceProvider;

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

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        View::composer('components.header', function ($view) {
            $lang = request()->route('lang', 'in'); 
            $type = request()->route('type', 'home'); 
            $view->with(['lang' =>$lang, 'type' => $type]);
        });
    }
}
