Skip to content

Commit

Permalink
Merge pull request #18 from Ewa-Podolak/patch-1
Browse files Browse the repository at this point in the history
Change 'dispatchAfterResponse' to 'dispatch'
  • Loading branch information
hotmeteor authored Feb 21, 2023
2 parents 32f7f49 + c9e5e45 commit a5c70d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ For example, a Stripe webhook handler would be `App\Http\Handlers\Stripe\Custome

Each handler is constructed with the `event` (name of the webhook event) and `data` properties.

Each handler must also use the `Dispatchable` trait.

```php
<?php

Expand Down
2 changes: 1 addition & 1 deletion src/Providers/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ protected function handle(): static
$class = $this->getClass($event = $this->webhook->getEvent());

if (class_exists($class)) {
$class::dispatchAfterResponse($event, $this->webhook->getData());
$class::dispatch($event, $this->webhook->getData());

$this->dispatched = true;
}
Expand Down

0 comments on commit a5c70d7

Please sign in to comment.