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
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -78,17 +78,17 @@ php artisan migrate
78
78
### Routing
79
79
Finally, take care of the routing: At [the Lob.com dashboard](https://dashboard.lob.com/#/webhooks) you must configure at what url Lob.com webhooks should hit your app. In the routes file of your app you must pass that route to `Route::lobWebhooks()`:
80
80
81
-
I like to group functionality by domain, so would suggest `webwooks\lob`
81
+
I like to group functionality by domain, so would suggest `webhooks/lob`
82
82
83
83
```php
84
-
Route::lobWebhooks('webwooks\lob');
84
+
Route::lobWebhooks('webhooks/lob');
85
85
```
86
86
87
87
Behind the scenes this will register a `POST` route to a controller provided by this package. Because Lob.com 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\lob',
91
+
'webhooks/lob',
92
92
];
93
93
```
94
94
@@ -117,13 +117,13 @@ use Illuminate\Bus\Queueable;
117
117
use Illuminate\Queue\SerializesModels;
118
118
use Illuminate\Queue\InteractsWithQueue;
119
119
use Illuminate\Contracts\Queue\ShouldQueue;
120
-
use BinaryCats\LobWebhooks\WebhookCall;
120
+
use Spatie\WebhookClient\Models\WebhookCall;
121
121
122
122
class HandleDeliveredSource implements ShouldQueue
123
123
{
124
124
use InteractsWithQueue, Queueable, SerializesModels;
public function __construct(WebhookCall $webhookCall)
@@ -181,7 +181,7 @@ Here's an example of such a listener:
181
181
namespace App\Listeners;
182
182
183
183
use Illuminate\Contracts\Queue\ShouldQueue;
184
-
use BinaryCats\LobWebhooks\WebhookCall;
184
+
use Spatie\WebhookClient\Models\WebhookCall;
185
185
186
186
class LetterCreatedListener implements ShouldQueue
187
187
{
@@ -205,8 +205,8 @@ The above example is only one way to handle events in Laravel. To learn the othe
205
205
All incoming webhook requests are written to the database. This is incredibly valuable when something goes wrong while handling a webhook call. You can easily retry processing the webhook call, after you've investigated and fixed the cause of failure, like this:
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 Lob.com posts to `lob-webhook-url/my-named-secret` you'd add a new config named `signing_secret_my-named-secret`.
252
252
253
253
Example config might look like:
254
254
255
255
```php
256
-
// secret for when Lob.com posts to lob-webhook-url/account
256
+
// secret for when Lob.com posts to webhooks/lob/account
257
257
'signing_secret_account' => 'whsec_abc',
258
-
// secret for when Lob.com posts to lob-webhook-url/connect
258
+
// secret for when Lob.com posts to webhooks/lob/connect
0 commit comments