Skip to content

Commit 4506f6b

Browse files
committed
Update notification.md
1 parent 4ed300b commit 4506f6b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/notification.md

+12
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ $user->notify(new TestNotification());
5959
userId or groupId. ID can be obtained from FollowEvent or JoinEvent.
6060

6161
## TextMessage
62+
6263
You can send up to 5 messages.
6364

6465
```php
@@ -88,6 +89,17 @@ use Revolution\Line\Notifications\LineMessage;
8889
}
8990
```
9091

92+
You can also specify a name and icon with `create()` method, which is easier if you're just creating a single text message.
93+
94+
```php
95+
use Revolution\Line\Notifications\LineMessage;
96+
97+
public function toLine(object $notifiable): LineMessage
98+
{
99+
return LineMessage::create(text: 'test', name: 'alt-name', icon: 'https://...png');
100+
}
101+
```
102+
91103
## StickerMessage
92104

93105
Only the stickers on this page can be used.

0 commit comments

Comments
 (0)