app->make('config'); /** @noinspection PhpIncludeInspection */ $config->set('payment', array_merge( require $config_path, $config->get('payment', []) )); $this->app->singleton('payment', function (Application $app) use ($config) { return new PaymentManager($app, $config->get('payment.default')); }); $this->app->alias('payment', PaymentManager::class); $this->publishes([ $config_path => $this->app->configPath('payment.php') ], 'config'); } }