Skip to content

Commit

Permalink
Merge pull request #3 from jmrieger/patch-2
Browse files Browse the repository at this point in the history
Add support for Lumen
  • Loading branch information
berkayk committed Jun 1, 2016
2 parents 93a2b33 + 40be7b8 commit 07806bd
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/OneSignalServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@ class OneSignalServiceProvider extends ServiceProvider
public function boot()
{
$configPath = __DIR__ . '/../config/onesignal.php';
$this->publishes([$configPath => config_path('onesignal.php')]);
$this->mergeConfigFrom($configPath, 'onesignal');
$app = $this->app;

if (class_exists('Illuminate\Foundation\Application') && $app instanceof LaravelApplication && $app->runningInConsole()) {
$this->publishes([$configPath => config_path('onesignal.php')]);
$this->mergeConfigFrom($configPath, 'onesignal');
} else if ( class_exists('Laravel\Lumen\Application', false) ) {
$app->configure('onesignal');
}
}

/**
Expand Down

0 comments on commit 07806bd

Please sign in to comment.