edamov / pushok

PHP client for Apple Push Notification Service (APNs) - Send push notifications to iOS using the new APNs HTTP/2 protocol with token-based (JWT with p8 private key)
MIT License
368 stars 119 forks source link

Class Pushok\AuthProvider\Token Not Found #113

Closed grappetite-tahir closed 1 year ago

grappetite-tahir commented 3 years ago

Before it was working and now I come back to this project and I can see its giving me this error. I'm using PHP 7.2+ Laravel 5.8+

What I'm missing

All the traits are included

use Pushok\AuthProvider; use Pushok\Client; use Pushok\Notification; use Pushok\Payload; use Pushok\Payload\Alert;

Still getting this issue.

This line $authProvider = AuthProvider\Token::create($options);

I change this line to $authProvider = Pushok\AuthProvider\Token::create($options); or $authProvider = \Pushok\AuthProvider\Token::create($options);

but no luck.

oktaykalfa commented 3 years ago

im having the same problem.

stollr commented 3 years ago

@grappetite-tahir can you have a look at https://github.com/edamov/pushok/issues/132#issuecomment-806875951

yasinahmed81 commented 3 years ago

I had this issue on my AWS instance, please install the extensions, gmp and bcmath, then restart your server.

Hardik4296 commented 1 year ago

use Pushok\AuthProvider; $authProvider = AuthProvider\Token::create($options);

these 2 changes work for me.