<?php

namespace Functional\Programs\Providers;

use Functional\Programs\Database\Seeders\ProgramsSeeder;
use Xefi\LaravelOSDD\LayerServiceProvider;

class ProgramsServiceProvider extends LayerServiceProvider
{
    public function boot(): void
    {
        if ($this->app->runningInConsole()) {
            $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
            $this->loadSeeders([ProgramsSeeder::class]);
        }

        $this->withRouting(
            web: __DIR__ . '/../../routes/web.php',
            api: __DIR__ . '/../../routes/api.php',
            commands: __DIR__ . '/../../routes/console.php',
            channels: __DIR__ . '/../../routes/channels.php',
        );
        $this->loadSeeders([\Functional\Programs\Database\Seeders\ProgramsSeeder::class]);
    }

    public function register(): void
    {
        //
    }
}
