Skip to content

Commit 60eef6b

Browse files
committed
docs: update readme
1 parent 84cbb36 commit 60eef6b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88

99
This package makes it easy to send web push notifications with Laravel.
1010

11+
## Features
12+
13+
- **Easy integration with Laravel notifications:** Seamlessly integrates with Laravel's notification system, allowing you to send web push notifications using familiar notification channels.
14+
- **Multiple browser support:** Works with all major browsers that implement the [Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API), including Chrome, Firefox, Edge, and Safari.
15+
- **VAPID support:** Easily generate and manage VAPID keys for secure browser authentication.
16+
- **Flexible message options:** Customize notifications with title, body, icon, actions, TTL, and more. Supports advanced options like vibration, badge, image, and custom data payloads.
17+
- **Subscription management:** Convenient methods to save, update, and delete push subscriptions directly on your notifiable models.
18+
- **Automatic expired subscription cleanup:** When sending a push message to an expired subscription, the package detects expired endpoints (using the `expired` flag of `Minishlink\WebPush\MessageSentReport`). This package will automatically delete expired subscriptions.
19+
- **Configurable and extendable:** Publish and customize the package's config file to fit your application's needs.
20+
1121
## Installation
1222

1323
You can install the package via Composer:
@@ -53,7 +63,10 @@ php artisan webpush:vapid
5363

5464
This command will set `VAPID_PUBLIC_KEY` and `VAPID_PRIVATE_KEY` in your `.env` file. You need the `VAPID_PUBLIC_KEY` as `applicationServerKey` when using the [Push API](https://developer.mozilla.org/en-US/docs/Web/API/Push_API).
5565

56-
> **Note:** If targeting Safari or iOS after 2023, you will need to include the `VAPID_SUBJECT` variable as well, or Apple will return a `BadJwtToken` error.
66+
> **Note for Safari:**
67+
> - If targeting Safari or iOS (especially after 2023), you **must** include the `VAPID_SUBJECT` variable in your `.env` file. This should be a valid URL (e.g. `https://example.com`) or a `mailto:` address (e.g. `mailto:[email protected]`).
68+
> - Apple will reject requests with a `BadJwtToken` error if `VAPID_SUBJECT` is missing or invalid.
69+
> - The domain in `VAPID_SUBJECT` must be a valid, existing top-level domain (TLD).
5770
5871
__These keys must be safely stored and should not change.__
5972

0 commit comments

Comments
 (0)