Skip to content

Commit

Permalink
Update README.md with instructions for using the package.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulferrett committed Sep 23, 2022
1 parent b4ae99c commit e9dd462
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,43 @@ Plivo Notifier

Provides [Plivo](https://www.plivo.com) integration for Symfony Notifier.


Installation
------------

1. Install package using composer

```bash
composer require rentbetter/plivo-notifier@^6.1
```

2. Add your Plivo DSN to your environment variables, e.g. in `.env`

```
PLIVO_DSN=plivo://AUTH_ID:AUTH_TOKEN@default?from=FROM
```

3. Register the `PlivoTransportFactory` in your `services.yaml`

```yaml
notifier.transport_factory.plivo:
class: Symfony\Component\Notifier\Bridge\Plivo\PlivoTransportFactory
parent: notifier.transport_factory.abstract
tags: ['texter.transport_factory']
```
4. Enable the Plivo transport in your `config/packages/notifier.yaml` configuration

```yaml
framework:
notifier:
texter_transports:
plivo: '%env(PLIVO_DSN)%'
```

5. Start sending SMS in your application, see [the symfony docs](https://symfony.com/doc/current/notifier.html#creating-sending-notifications)


DSN example
-----------

Expand All @@ -17,6 +54,7 @@ where:
- `URL` (optional) is the URL to which Plivo should send delivery updates
- `METHOD` (optional) is the HTTP method (GET, POST) with which Plivo should call `URL`
Resources
---------
Expand Down

0 comments on commit e9dd462

Please sign in to comment.