<?php

namespace Kylin\Export;

use Illuminate\Support\ServiceProvider;
use Kylin\Export\Services\ExportService;

class ExportServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->mergeConfigFrom(__DIR__ . '/../config/kylin-export.php', 'kylin-export');
        $this->app->singleton(ExportService::class);
        $this->app->singleton('kylin-export', ExportService::class);
    }

    public function boot(): void
    {
        $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
        $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');
    }
}
