Skip to content

Commit 531c794

Browse files
Update README.md
1 parent dc24546 commit 531c794

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

README.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ final class SuspiciousActivityDetected extends Notification
6969
}
7070
```
7171

72-
> **Note** Detailed explanation regarding the Expo Message Request Format can be found [here](#expo-message-request-format).
72+
> [!NOTE]
73+
> Detailed explanation regarding the Expo Message Request Format can be found [here](#expo-message-request-format).
7374
7475
You can also apply conditionals to `ExpoMessage` without breaking the method chain:
7576

@@ -105,9 +106,11 @@ final class User extends Authenticatable
105106
}
106107
```
107108

108-
> **Warning** No notifications will be sent in case of `null`.
109+
> [!IMPORTANT]
110+
> No notifications will be sent in case of `null`.
109111
110-
> **Note** More info regarding the model cast can be found [here](#model-casting).
112+
> [!NOTE]
113+
> More info regarding the model cast can be found [here](#model-casting).
111114
112115
#### Multicasting (multiple devices)
113116

@@ -129,7 +132,8 @@ final class User extends Authenticatable
129132
}
130133
```
131134

132-
> **Warning** No notifications will be sent in case of an empty `Collection`.
135+
> [!IMPORTANT]
136+
> No notifications will be sent in case of an empty `Collection`.
133137
134138
### Sending
135139

@@ -200,12 +204,12 @@ final class HandleFailedExpoNotifications
200204
The `NotificationFailed::$data` property will contain an instance of `ExpoError` which has the following properties:
201205

202206
```php
203-
final class ExpoError
207+
final readonly class ExpoError
204208
{
205209
private function __construct(
206-
public readonly ExpoErrorType $type,
207-
public readonly ExpoPushToken $token,
208-
public readonly string $message,
210+
public ExpoErrorType $type,
211+
public ExpoPushToken $token,
212+
public string $message,
209213
) {}
210214
}
211215
```
@@ -235,7 +239,7 @@ Sets the number to display in the badge on the app icon.
235239
badge(int $value)
236240
```
237241

238-
> **Note**
242+
> [!NOTE]
239243
> The value must be greater than or equal to 0.
240244
241245
### Body
@@ -247,7 +251,7 @@ body(string $value)
247251
text(string $value)
248252
```
249253

250-
> **Note**
254+
> [!NOTE]
251255
> The value must not be empty.
252256
253257
### Category ID
@@ -258,7 +262,7 @@ Sets the ID of the notification category that this notification is associated wi
258262
categoryId(string $value)
259263
```
260264

261-
> **Note**
265+
> [!NOTE]
262266
> The value must not be empty.
263267
264268
### Channel ID (Android)
@@ -269,7 +273,7 @@ Sets the ID of the Notification Channel through which to display this notificati
269273
channelId(string $value)
270274
```
271275

272-
> **Note**
276+
> [!NOTE]
273277
> The value must not be empty.
274278
275279
### JSON data
@@ -280,8 +284,8 @@ Sets the JSON data for the message.
280284
data(Arrayable|Jsonable|JsonSerializable|array $value)
281285
```
282286

283-
> **Warning**
284-
> We're compressing JSON payloads that exceed 1 KiB using Gzip (if `ext-zlib` is available). While you could technically send more than 4 KiB of data, this is not recommended.
287+
> [!WARNING]
288+
> We're compressing JSON payloads that exceed 1 KiB using Gzip (if [`ext-zlib`](https://www.php.net/manual/en/book.zlib.php) is available). While you could technically send more than 4 KiB of data, this is not recommended.
285289
286290
### Expiration
287291

@@ -291,10 +295,10 @@ Sets the expiration time of the message. Same effect as TTL.
291295
expiresAt(DateTimeInterface|int $value)
292296
```
293297

294-
> **Warning**
298+
> [!WARNING]
295299
> `TTL` takes precedence if both are set.
296300
297-
> **Note**
301+
> [!NOTE]
298302
> The value must be in the future.
299303
300304
### Mutable content (iOS)
@@ -313,7 +317,7 @@ Play the default notification sound when the recipient receives the notification
313317
playSound()
314318
```
315319

316-
> **Warning**
320+
> [!WARNING]
317321
> Custom sounds are not supported.
318322
319323
### Priority
@@ -327,7 +331,7 @@ normal()
327331
high()
328332
```
329333

330-
> **Note**
334+
> [!NOTE]
331335
> The value must be `default`, `normal` or `high`.
332336
333337
### Subtitle (iOS)
@@ -338,7 +342,7 @@ Sets the subtitle to display in the notification below the title.
338342
subtitle(string $value)
339343
```
340344

341-
> **Note**
345+
> [!NOTE]
342346
> The value must not be empty.
343347
344348
### Title
@@ -349,7 +353,7 @@ Set the title to display in the notification.
349353
title(string $value)
350354
```
351355

352-
> **Note**
356+
> [!NOTE]
353357
> The value must not be empty.
354358
355359
### TTL (Time to live)
@@ -361,10 +365,10 @@ ttl(int $value)
361365
expiresIn(int $value)
362366
```
363367

364-
> **Warning**
368+
> [!WARNING]
365369
> Takes precedence over `expiration` if both are set.
366370
367-
> **Note**
371+
> [!NOTE]
368372
> The value must be greater than 0.
369373
370374
## Testing

0 commit comments

Comments
 (0)