<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\View;
use App\Models\Setting;

class ViewServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        // nothing here
    }

    public function boot(): void
    {
        View::composer('frontend.*', function ($view) {
            $view->with('settings', Setting::first());
        });
    }
}
