Skip to content

Commit

Permalink
More Lumen fixes required!
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Lawrence committed Dec 21, 2015
1 parent 6c27236 commit f692722
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/Vatsim/Xml/XmlServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,32 @@ public function dir($path){
* @return void
*/
public function boot()
{

}

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$request = $this->app['request'];

// Lumen users need to copy the config themselves
// And it needs to pulled completely differently.
// So more work required. Luckily barryvdh had the answer - so thanks.
if(str_contains($this->app->version(), "Lumen")){
$this->app->configure("vatsim-xml.php");
$this->app->configure("vatsim-xml");
} else {
$this->publishes([
$this->dir("config/config.php") => config_path("vatsim-xml.php"),
]);
}
}

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->app['vatsimxml'] = $this->app->share(function($app)
{
return new XML( $app['config']->get('vatsim-xml.config') );
$this->app['vatsimxml'] = $this->app->share(function($app){
return new XML( $this->app["config"]->get("vatsim-xml") );
});
}

Expand Down

0 comments on commit f692722

Please sign in to comment.