Skip to content

Commit

Permalink
Fixed config typo.
Browse files Browse the repository at this point in the history
By default, php artisan vendor:publish should work fine in Laravel 5 applications. Lumen users may create onesignal config file manually.
  • Loading branch information
berkayk committed Oct 19, 2016
1 parent 437b2b5 commit e228f45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/onesignal.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
|
*/
'rest_api_key' => 'YOUR-REST-API-KEY-HERE',
'user_auth_key' => 'YOUR-'
'user_auth_key' => 'YOUR-USER-AUTH-KEY'
);
13 changes: 6 additions & 7 deletions src/OneSignalServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ class OneSignalServiceProvider extends ServiceProvider
public function boot()
{
$configPath = __DIR__ . '/../config/onesignal.php';
$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');

$this->publishes([$configPath => config_path('onesignal.php')]);
$this->mergeConfigFrom($configPath, 'onesignal');

if ( class_exists('Laravel\Lumen\Application') ) {
$this->app->configure('onesignal');
}
}

Expand Down

1 comment on commit e228f45

@davorpeic
Copy link

@davorpeic davorpeic commented on e228f45 Nov 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, any reasons why would this commit give this error?

Fatal error: Call to undefined function Berkayk\OneSignal\config_path() in /Applications/XAMPP/xamppfiles/htdocs/mywebapp/web-agent/vendor/berkayk/onesignal-laravel/src/OneSignalServiceProvider.php on line 18

with previous version is working fine
thanks

Please sign in to comment.