Download the PHP package rajchotaliya/apple-push-notification-service without Composer
On this page you can find all versions of the php package rajchotaliya/apple-push-notification-service. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rajchotaliya/apple-push-notification-service
More information about rajchotaliya/apple-push-notification-service
Files in rajchotaliya/apple-push-notification-service
Package apple-push-notification-service
Short Description A PHP package to send push notifications using Apple's APNs.
License MIT
Informations about the package apple-push-notification-service
Apple Push Notification Service (APNs)
A PHP library to send push notifications to Apple devices using the APNs service.
Installation
Install the library using Composer:
Usage
Laravel
-
Configuration :
-
Environment Variables (Required)
Add the following entries to your
.env
file: -
Publish Config File (Optional)
After installing the package, publish the configuration file using the following Artisan command:
This will publish the
apns.php
file into your Laravel project'sconfig
directory. You can then customize it to fit your needs.Example configuration in
config/apns.php
:
-
-
Using the Library:
You can use the library in your Laravel application as follows:
Core PHP
-
Configuration (Required) :
Manually create a configuration file at
config/apns.php
in your project root directory: -
Using the Library:
You can use the library in a Core PHP project as follows:
Fetch JWT for Authentication (Separate Token Fetch)
-
Fetch JWT for Authentication (Separate Token Fetch)
To fetch the JWT (JSON Web Token) for authentication with Apple's APNs service, you can use the following method. This token is used for making authenticated requests to the APNs service.
Example:
The
fetchJWT()
method retrieves the token needed for authenticating requests, ensuring that your notifications are sent securely to the APNs service.
Features
- Laravel Support: Includes a service provider and configuration publishing for seamless integration.
- Core PHP Compatibility: Easily load configuration and use the library without a framework.
- Cross-Platform: Compatible with all PHP versions >= 8.0.
Support
Feel free to contribute or raise issues in the GitHub repository.
Show Your Appreciation
You can show your appreciation by buying me a tea through the following link: