laravel-onesignal icon indicating copy to clipboard operation
laravel-onesignal copied to clipboard

Integration With Lumen

Open appsdev85 opened this issue 6 years ago • 5 comments

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.

appsdev85 avatar Feb 21 '19 23:02 appsdev85

This must be fixed with the latest release.

berkayk avatar Aug 18 '19 21:08 berkayk

Why is it still in the source? Or are you talking about Lumen 6.*?

ThaDaVos avatar Oct 14 '19 12:10 ThaDaVos

@HWSTS https://gist.github.com/mabasic/21d13eab12462e596120 add helper class in config_path function.

canerd7u avatar Feb 10 '20 15:02 canerd7u

Hello I used OneSignal::sendNotificationToAll() but it showing Class 'OneSignal' not found error showing.

rvkvino avatar Jun 22 '20 07:06 rvkvino

@HWSTS https://gist.github.com/mabasic/21d13eab12462e596120 add helper class in config_path function.

this solved the issue

suijt avatar Dec 07 '22 05:12 suijt