Skip to content

Commit e5d5398

Browse files
authored
Merge pull request #29 from jonnycbw/updatedREADME
Updated README.md
2 parents c39097f + 3fd130e commit e5d5398

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

README.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111

1212
## Contents
1313

14-
- [Installation](#installation)
15-
- [Usage](#usage)
16-
- [Available Message methods](#available-message-methods)
17-
- [Changelog](#changelog)
18-
- [Testing](#testing)
19-
- [Security](#security)
20-
- [Contributing](#contributing)
21-
- [Credits](#credits)
22-
- [License](#license)
23-
14+
- [Installation](#installation)
15+
- [Usage](#usage) - [Available Message methods](#available-message-methods)
16+
- [Changelog](#changelog)
17+
- [Testing](#testing)
18+
- [Security](#security)
19+
- [Contributing](#contributing)
20+
- [Credits](#credits)
21+
- [License](#license)
2422

2523
## Installation
24+
2625
You can install the package via composer:
26+
2727
```bash
2828
composer require alymosul/laravel-exponent-push-notifications
2929
```
@@ -38,11 +38,15 @@ If you are using Laravel 5.5 or higher this package will automatically register
3838
],
3939

4040
```
41-
Before publish exponent notification migration you must add in .env file:
41+
42+
Before publish exponent notification migration you must add in .env file:
43+
4244
```bash
4345
EXPONENT_PUSH_NOTIFICATION_INTERESTS_STORAGE_DRIVER=database
4446
```
47+
4548
You can publish the migration with:
49+
4650
```bash
4751
php artisan vendor:publish --provider="NotificationChannels\ExpoPushNotifications\ExpoPushNotificationsServiceProvider" --tag="migrations"
4852
```
@@ -54,6 +58,7 @@ php artisan migrate
5458
```
5559

5660
You can optionally publish the config file with:
61+
5762
```bash
5863
php artisan vendor:publish --provider="NotificationChannels\ExpoPushNotifications\ExpoPushNotificationsServiceProvider" --tag="config"
5964
```
@@ -77,7 +82,7 @@ return [
7782

7883
## Usage
7984

80-
``` php
85+
```php
8186
use NotificationChannels\ExpoPushNotifications\ExpoChannel;
8287
use NotificationChannels\ExpoPushNotifications\ExpoMessage;
8388
use Illuminate\Notifications\Notification;
@@ -94,6 +99,7 @@ class AccountApproved extends Notification
9499
return ExpoMessage::create()
95100
->badge(1)
96101
->enableSound()
102+
->title("Congratulations!")
97103
->body("Your {$notifiable->service} account was approved!");
98104
}
99105
}
@@ -102,11 +108,15 @@ class AccountApproved extends Notification
102108
### Available Message methods
103109

104110
A list of all available options
105-
- `body('')`: Accepts a string value for the body.
106-
- `enableSound()`: Enables the notification sound.
107-
- `disableSound()`: Mutes the notification sound.
108-
- `badge(1)`: Accepts an integer value for the badge.
109-
- `ttl(60)`: Accepts an integer value for the time to live.
111+
112+
- `title('')`: Accepts a string value for the title.
113+
- `body('')`: Accepts a string value for the body.
114+
- `enableSound()`: Enables the notification sound.
115+
- `disableSound()`: Mutes the notification sound.
116+
- `badge(1)`: Accepts an integer value for the badge.
117+
- `ttl(60)`: Accepts an integer value for the time to live.
118+
- `jsonData('')`: Accepts a json string or an array for additional.
119+
- `channelID('')`: Accepts a string to set the channelId of the notification for Android devices.
110120

111121
### Managing Recipients
112122

@@ -122,7 +132,7 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen
122132

123133
## Testing
124134

125-
``` bash
135+
```bash
126136
$ composer test
127137
```
128138

@@ -136,8 +146,8 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
136146

137147
## Credits
138148

139-
- [Aly Suleiman](https://github.com/Alymosul)
140-
- [All Contributors](../../contributors)
149+
- [Aly Suleiman](https://github.com/Alymosul)
150+
- [All Contributors](../../contributors)
141151

142152
## License
143153

0 commit comments

Comments
 (0)