Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pushok Laravel Package

edamov/pushok

Pushok is a PHP library for sending iOS push notifications via Apple's APNs HTTP/2 API. It supports JWT token and certificate authentication, custom payloads, and batch delivery, making it easy to add reliable Apple Push Notification service support to Laravel or any PHP app.

Deep Wiki
Context7

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)

Frequently asked questions about Pushok
How do I install and configure Pushok for APNs in a Laravel app?
Install it with Composer using edamov/pushok, then construct a Pushok Client with your auth credentials and bundle ID. There is no ServiceProvider, facade, or publishable config, so you bind a configured Client as a singleton in a small in-house ServiceProvider and read values from a config/pushok.php file backed by env vars like APNS_KEY_ID, APNS_TEAM_ID, APNS_KEY_PATH, APNS_BUNDLE_ID, and APNS_SANDBOX. Expect roughly one to two engineering days for the wrapper plus a sandbox smoke test.
Does Pushok support JWT token authentication with .p8 keys or only certificates?
Pushok supports both token-based JWT authentication using a .p8 provider key with key ID and team ID, and legacy .p12 certificate authentication. Token-based auth is the preferred path because provider keys do not expire annually like certificates. You are responsible for caching and regenerating provider tokens and for the key rotation runbook.
Which Laravel and PHP versions are compatible with Pushok?
It runs on PHP 7.4 through 8.3 and fits Laravel 8 through 11, since it is a framework-agnostic library rather than a Laravel package. Because it pins its own HTTP client dependencies, check for version conflicts with your existing Composer requirements before adding it. Validate the install in CI on every deploy target, not just locally.
Why do my Pushok push notifications fail silently on some servers?
The most common cause is a curl build without HTTP/2 support, which means nghttp2 is missing, since APNs requires HTTP/2. You also need ext-openssl with ES256 support for JWT signing. Validate both requirements in CI and on every deploy host, because the failure often surfaces only as a delivery that never arrives.
How do I send APNs notifications from Laravel with Pushok and a notification channel?
Pushok has no built-in Laravel notification channel, so you wrap sends in queued jobs and write a thin channel adapter, or use laravel-notification-channels/apn, which wraps Pushok as its underlying driver. If your organization already uses that channel, keep it rather than rebuilding. For greenfield work, abstract sends behind a PushNotifier interface so the transport can be swapped without touching product code.
How does Pushok handle APNs error responses such as BadDeviceToken or Unregistered?
Pushok returns structured APNs error responses per notification, including reasons like BadDeviceToken, Unregistered, and ExpiredProviderToken. It provides no operational policy on top, so you build a translation layer that prunes invalid device tokens, refreshes expired provider tokens, and logs failures for observability. Plan for error mapping and metrics before production cutover.
Can Pushok send silent background pushes, VoIP notifications, and rich notifications?
Yes. Its payload builder lets you compose custom aps dictionaries for alerts, silent and background updates, VoIP via PushKit, and rich notifications with mutable-content. Keep in mind that silent and VoIP pushes have stricter Apple-side delivery semantics, so test them against real devices. Also validate payload size limits and required aps keys in your own layer.
How do I test Pushok against the APNs sandbox before going to production?
Point the client at api.sandbox.push.apple.com, typically via an APNS_SANDBOX environment flag, and send to a single real device token as a smoke test. Test both the sandbox and production endpoints explicitly and never let sandbox device tokens leak into production traffic. Confirm your .p8 key format matches what Apple issued before testing.
Is Pushok actively maintained and safe to depend on in production?
Pushok is a single-maintainer library with modest ecosystem traction, so treat it as a pinned dependency rather than a foundation. Pin the version, track releases, and keep a documented fallback such as a fork or an alternative APNs client in your risk register. If you need drop-in reliability tooling, compare it against maintained alternatives before committing.
Does Pushok handle retries, queues, rate limiting, or token pruning?
No. Pushok is a transport-layer client, so retry and backoff logic, queue semantics, rate limiting, and device token pruning must all be built around it, typically with Laravel queued jobs. Note that JWT provider tokens have roughly a one-hour TTL and require accurate system clocks, so a careless caching strategy becomes a latent outage. Own that operational policy in your integration layer, not in the library.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager