Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
theoafactor committed Mar 6, 2022
1 parent ae8489e commit e23b978
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use Messenger\Messenger;

1. You should set the environmental values with .env file at the root of your project. Please use the .env.example file as an example.

2. Create a .env file and copy the sample from .env.example file over.
2. Create a .env file and copy the sample from .env.example file inside theoafactor/messenger/src directory over.

3. Supply the data.

Expand All @@ -69,7 +69,7 @@ use Messenger\Messenger;
```

4. In the email template, we can reference these variables by using:
4. In the email template, we can reference the firstname key by using:

```
<body>
Expand All @@ -81,6 +81,22 @@ use Messenger\Messenger;
```


### Loops

1. This package uses basic looping mechanism and only supports the foreach loop. To loop through an array in the template, follow the sample below:

```
@foreach(arrayKey as item)
{{ item }}
@endforeach
```

2. Remember that the *arrayKey* comes from the data you passed to the sendMessage() method.

3. Support for *nested loops* has not been added.

4. Support for *conditional statements* has not been added.


### Note

Expand Down

0 comments on commit e23b978

Please sign in to comment.