Skip to content

Commit 14e6504

Browse files
authored
Merge pull request #3 from binary-cats/update-docs
Update docs
2 parents 65a61e7 + 4ca54ac commit 14e6504

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ php artisan migrate
7777
### Routing
7878
Finally, take care of the routing: At [the Mailgun dashboard](https://app.mailgun.com/app/sending/domains) you must configure at what url Mailgun webhooks should hit your app. In the routes file of your app you must pass that route to `Route::mailgunWebhooks()`:
7979

80-
I like to group functionality by domain, so I would suggest `webwooks/mailgun` (especially if you plan to have more webhooks), but it is up to you.
80+
I like to group functionality by domain, so I would suggest `webhooks/mailgun` (especially if you plan to have more webhooks), but it is up to you.
8181

8282
```php
8383
# routes\web.php
84-
Route::mailgunWebhooks('webwooks/mailgun');
84+
Route::mailgunWebhooks('webhooks/mailgun');
8585
```
8686

8787
Behind the scenes this will register a `POST` route to a controller provided by this package. Because Mailgun has no way of getting a csrf-token, you must add that route to the `except` array of the `VerifyCsrfToken` middleware:
8888

8989
```php
9090
protected $except = [
91-
'webwooks/mailgun',
91+
'webhooks/mailgun',
9292
];
9393
```
9494

@@ -241,23 +241,23 @@ When needed might want to the package to handle multiple endpoints and secrets.
241241
If you are using the `Route::mailgunWebhooks` macro, you can append the `configKey` as follows:
242242

243243
```php
244-
Route::mailgunWebhooks('webwooks/mailgun/{configKey}');
244+
Route::mailgunWebhooks('webhooks/mailgun/{configKey}');
245245
```
246246

247247
Alternatively, if you are manually defining the route, you can add `configKey` like so:
248248

249249
```php
250-
Route::post('webwooks/mailgun/{configKey}', 'BinaryCats\MailgunWebhooks\MailgunWebhooksController');
250+
Route::post('webhooks/mailgun/{configKey}', 'BinaryCats\MailgunWebhooks\MailgunWebhooksController');
251251
```
252252

253-
If this route parameter is present the verify middleware will look for the secret using a different config key, by appending the given the parameter value to the default config key. E.g. If Mailgun posts to `webwooks/mailgun/my-named-secret` you'd add a new config named `signing_secret_my-named-secret`.
253+
If this route parameter is present the verify middleware will look for the secret using a different config key, by appending the given the parameter value to the default config key. E.g. If Mailgun posts to `webhooks/mailgun/my-named-secret` you'd add a new config named `signing_secret_my-named-secret`.
254254

255255
Example config might look like:
256256

257257
```php
258-
// secret for when Mailgun posts to webwooks/mailgun/account
258+
// secret for when Mailgun posts to webhooks/mailgun/account
259259
'signing_secret_account' => 'whsec_abc',
260-
// secret for when Mailgun posts to webwooks/mailgun/my-named-secret
260+
// secret for when Mailgun posts to webhooks/mailgun/my-named-secret
261261
'signing_secret_my-named-secret' => 'whsec_123',
262262
```
263263

0 commit comments

Comments
 (0)