<?php

declare(strict_types=1);


namespace Plugins\Neatstudio\BlogSeo;

use App\Blog\Support\PluginManager;
use App\Blog\Support\PluginServiceProvider;
use Plugins\Neatstudio\BlogSeo\Http\Middleware\SeoMiddleware;
use Plugins\Neatstudio\BlogSeo\Http\SeoController;

class ServiceProvider extends PluginServiceProvider
{
    protected function boot(PluginManager $manager): void
    {
        $this->loadRoutes(__DIR__.'/../routes/web.php');

        app('router')->pushMiddlewareToGroup('web', SeoMiddleware::class);

        $manager->addFilter('seo.structured_data', function (array $data) {
            return $data;
        });
    }
}
