<?php
namespace App\Domains\Artisan\Providers;

use Illuminate\Support\ServiceProvider;
use App\Domains\Artisan\Providers\RouteServiceProvider;
use Illuminate\Database\Eloquent\Factory as EloquentFactory;

class ArtisanServiceProvider extends ServiceProvider
{
    /**
     * 引导启动任何应用程序服务
     *
     * php artisan make:migration --path=app/Domains/Artisan/Database/migrations
     *
     * @return void
     */
    public function boot()
    {
        $this->loadMigrationsFrom([realpath(__DIR__ . '/../Database/migrations')]);
        // $this->app->make(EloquentFactory::class)->load(realpath(__DIR__ . '/../Database/factories'));
        // $this->mergeConfigFrom(realpath(__DIR__ . '/../config.php'), 'domain.artisan');
    }

    /**
     * 注册一个服务提供者
     *
     * @return void
     */
    public function register()
    {
        $this->app->register(RouteServiceProvider::class);
    }
}
