Modifying Readme
This commit is contained in:
parent
88eab63449
commit
e619f68be8
22
README.md
22
README.md
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
The BMail package allows you to send email templates on Laravel to the Bluescale API.
|
The BMail package allows you to send email templates on Laravel to the Bluescale API.
|
||||||
|
|
||||||
## Usage
|
## Installation
|
||||||
|
|
||||||
First in your composer.json, add :
|
First in your composer.json, add :
|
||||||
|
|
||||||
|
@ -42,4 +42,24 @@ BMAIL_API_KEY=your_key
|
||||||
BMAIL_API_URL=the_api_url
|
BMAIL_API_URL=the_api_url
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$template = (new BMailTemplate("** template_id **"))
|
||||||
|
->sender("john.doe@gmail.com", 'John')
|
||||||
|
->replyTo("jean.grey@gmail.com", 'Jean')
|
||||||
|
->recipients([
|
||||||
|
['elvis@gmail.com', ['name' => 'Elvis']],
|
||||||
|
['matthew@gmail.com', ['name' => 'Matthew', 'parameters' => ['key' => 'value']]
|
||||||
|
])
|
||||||
|
->addRecipient('edward@gmail.com')
|
||||||
|
->addRecipient("robert@gmail.com", ['name' => 'Rob', 'parameters' => ['key' => 'value']])
|
||||||
|
->parameters(['foo' => 'bar', 'foo' => 'fighter'])
|
||||||
|
->addParameter('key', 'value');
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
return (new BMailApi(config('bmail.api_key')))->send($template);
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue