<?php

namespace Functional\Routines\Providers;

use Functional\Routines\Database\Seeders\RoutinesSeeder;
use Xefi\LaravelOSDD\LayerServiceProvider;

class RoutinesServiceProvider extends LayerServiceProvider
{
    public function boot(): void
    {
        if ($this->app->runningInConsole()) {
            $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
            $this->loadSeeders([RoutinesSeeder::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\Routines\Database\Seeders\RoutinesSeeder::class]);
    }

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