loadMigrationsFrom([realpath(__DIR__ . '/../Database/migrations')]); $this->mergeConfigFrom(realpath(__DIR__ . '/../config.php'), 'domain.welcome'); $this->app->make(EloquentFactory::class)->load(realpath(__DIR__ . '/../Database/factories')); } /** * 注册一个服务提供者 * * @return void */ public function register() { $this->app->register(RouteServiceProvider::class); $this->app->register(MiddlewareServiceProvider::class); $this->registerResources(); } /** * 注册服务提供者资源 * * @return void */ protected function registerResources() { $this->app['translator']->addNamespace('welcome', realpath(__DIR__.'/../Resources/lang')); $this->app['view']->addNamespace('welcome', realpath(__DIR__.'/../Resources/views')); } /** * 获取提供者提供的服务 * * @return array */ public function provides() { return []; } }