ShowDocGenerationServiceProvider.php 609 字节
<?php

namespace Lackoxygen\ShowDocGeneration;

use Illuminate\Support\ServiceProvider;
use Lackoxygen\ShowDocGeneration\Commands\GenerationCommand;

class ShowDocGenerationServiceProvider extends ServiceProvider
{
    public function boot()
    {
        if ($this->app->runningInConsole()) {
            $configPath = __DIR__ . '/../publish/doc.php';
            $this->publishes([
                $configPath => config_path('doc.php')
            ], 'lackoxygen-doc');
        }
    }

    public function register()
    {
        $this->commands([
            GenerationCommand::class
        ]);
    }
}