berkayk / laravel-onesignal

OneSignal Push Notifications for Laravel
506 stars 176 forks source link

I cannot call 'OneSignal' #107

Closed erdemnagikho closed 4 years ago

erdemnagikho commented 5 years ago

Hi people, i cannot call 'OneSignal' and because of this i cannot use methods. I did install it step by step.

Abubakr077 commented 5 years ago

same error with me. I have added allies and providers lines too. tried all the previous threads solutions too with the same question.

Appsbender commented 5 years ago

Please find below the quickest solution you can use.

$client = new Berkayk\OneSignal\OneSignalClient( 'APP_ID', 'REST_API_KEY', 'USER_AUTH_KEY'; $client->sendNotificationToUser( 'message', 'player Id' );

jeanlambert17 commented 5 years ago

I have this same error.

jeanlambert17 commented 5 years ago

Ok, in top of the file I added "use OneSignal", and it works.