Skip to content

Commit

Permalink
fix EventDispatcher is not returning $event object
Browse files Browse the repository at this point in the history
  • Loading branch information
nuryagdym committed Sep 9, 2024
1 parent 870e880 commit 8388a5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/EventDispatcher/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Psr\EventDispatcher\EventDispatcherInterface;

/**
* Laravel does not have a built service for Psr\EventDispatcher\EventDispatcherInterface.
* Laravel does not have a built-in service for \Psr\EventDispatcher\EventDispatcherInterface.
* So we are implemented our own.
*/
class EventDispatcher implements EventDispatcherInterface
Expand All @@ -17,5 +17,7 @@ class EventDispatcher implements EventDispatcherInterface
public function dispatch(object $event)
{
Event::dispatch($event);

return $event;
}
}

0 comments on commit 8388a5d

Please sign in to comment.