<?php

namespace Functional\Tracking\Providers;

use Functional\Tracking\Database\Seeders\TrackingSeeder;
use Xefi\LaravelOSDD\LayerServiceProvider;

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

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