Skip to content

Commit

Permalink
Update XmlServiceProvider.php
Browse files Browse the repository at this point in the history
  • Loading branch information
NFarrington committed Aug 10, 2015
1 parent 6dbbb37 commit e6ba353
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Vatsim/Xml/XmlServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,32 @@ class XmlServiceProvider extends ServiceProvider {
*/
protected $defer = false;

/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->publishes([
__DIR__.'/../../config/config.php' => config_path('vatsim-xml.php')
]);
}

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->mergeConfigFrom(
__DIR__.'/../../config/config.php', 'vatsimxml'
);

$this->app['vatsimxml'] = $this->app->share(function($app)
{
return new XML( $app['config']->get('xml::config') );
return new XML($app['config']->get('vatsimxml'));
});
}

Expand Down

0 comments on commit e6ba353

Please sign in to comment.