Skip to content

Commit

Permalink
Merge pull request #10 from earnjam/fix/readme-method-name
Browse files Browse the repository at this point in the history
Correct opt-in method name in Readme docs
  • Loading branch information
liran-co authored Mar 12, 2021
2 parents d18e87d + 9657926 commit 0b48185
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ $user->notify(new InvoicePaid($invoice)); //This won't get sent.

By default, all notifications will be sent if no subscribe/unsubscribe record is found. This means you don't need to explicitly **subscribe** a user to a notification, you only need to **unsubscribe** them.

In some cases, however, you'd like to create opt-in notifications. To do so, modify your notification class and add a function called `getOptInChannels`:
In some cases, however, you'd like to create opt-in notifications. To do so, modify your notification class and add a function called `getOptInSubscriptions`:

```php
<?php
Expand All @@ -90,7 +90,7 @@ class InvoicePaid extends Notification
return ['mail', 'sms'];
}

public function getOptInChannels()
public function getOptInSubscriptions()
{
return ['sms'];
}
Expand Down Expand Up @@ -280,4 +280,4 @@ The package uses the following logic to resolve whether or not to send a notific
3b. If there is a record, send the notification based on the status of the subscription (subscribed or unsubscribed).

## License
Released under the [MIT](https://choosealicense.com/licenses/mit/) license. See [LICENSE](LICENSE.md) for more information.
Released under the [MIT](https://choosealicense.com/licenses/mit/) license. See [LICENSE](LICENSE.md) for more information.

0 comments on commit 0b48185

Please sign in to comment.