laravel-onesignal
laravel-onesignal copied to clipboard
Integration With Lumen
Hi,
I tried to add your library to my lumen project, so i registered the provider and alias in the bootstrap/app.php
$app->register(Berkayk\OneSignal\OneSignalServiceProvider::class);
class_alias(Berkayk\OneSignal\OneSignalFacade::class,'OneSignal');
but i'm getting the following error,
Call to undefined function Berkayk\OneSignal\config_path() in OneSignalServiceProvider.php line 18
of curse cause lumen don't have this function, although you add this code for lumen i think in the OneSignalServiceProvider.php
if ( class_exists('Laravel\Lumen\Application') ) {
$this->app->configure('onesignal');
}
Any help will be much appreciated.
This must be fixed with the latest release.
Why is it still in the source? Or are you talking about Lumen 6.*?
@HWSTS https://gist.github.com/mabasic/21d13eab12462e596120 add helper class in config_path function.
Hello I used OneSignal::sendNotificationToAll() but it showing Class 'OneSignal' not found error showing.
@HWSTS https://gist.github.com/mabasic/21d13eab12462e596120 add helper class in config_path function.
this solved the issue