<?php

namespace App\Http\Middleware;

use App\Services\SiteSettingsRepository;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

class ShareSiteSettings
{
    public function handle(Request $request, Closure $next): Response
    {
        view()->share('siteSettings', SiteSettingsRepository::current());

        return $next($request);
    }
}
