<?php

declare(strict_types=1);

namespace Kylin\Manufacturing;

use Illuminate\Support\ServiceProvider;

/**
 * 智能制造系统服务提供者
 *
 * 提供生产制造管理核心功能，包括生产计划、
 * 工艺流程、质量检测等。
 */
class ManufacturingServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->mergeConfigFrom(
            __DIR__.'/../config/kylin-manufacturing.php', 'kylin-manufacturing'
        );
    }

    public function boot(): void
    {
        $this->publishes([
            __DIR__.'/../config/kylin-manufacturing.php' => config_path('kylin-manufacturing.php'),
        ], 'kylin-manufacturing-config');

        $this->loadRoutesFrom(__DIR__.'/../routes/api.php');
    }
}
