You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,18 +77,18 @@ php artisan migrate
77
77
### Routing
78
78
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()`:
79
79
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.
81
81
82
82
```php
83
83
# routes\web.php
84
-
Route::mailgunWebhooks('webwooks/mailgun');
84
+
Route::mailgunWebhooks('webhooks/mailgun');
85
85
```
86
86
87
87
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:
88
88
89
89
```php
90
90
protected $except = [
91
-
'webwooks/mailgun',
91
+
'webhooks/mailgun',
92
92
];
93
93
```
94
94
@@ -241,23 +241,23 @@ When needed might want to the package to handle multiple endpoints and secrets.
241
241
If you are using the `Route::mailgunWebhooks` macro, you can append the `configKey` as follows:
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`.
254
254
255
255
Example config might look like:
256
256
257
257
```php
258
-
// secret for when Mailgun posts to webwooks/mailgun/account
258
+
// secret for when Mailgun posts to webhooks/mailgun/account
259
259
'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
0 commit comments