Skip to content

Commit

Permalink
Update event listener.
Browse files Browse the repository at this point in the history
Signed-off-by: crynobone <crynobone@gmail.com>
  • Loading branch information
crynobone committed Jan 21, 2017
1 parent fcab17b commit 1bc9b2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RouteManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ public function whenOn($path, $on, $listener)
$events = $this->app->make('events');
$listener = $events->makeListener($listener);

$events->listen($on, function () use ($listener, $path) {
$events->listen($on, function (...$payloads) use ($events, $listener, $path) {
if ($this->is($path) && $this->installed()) {
$listener(...func_get_args());
$listener($events, $payloads);
}
});
}
Expand Down

0 comments on commit 1bc9b2d

Please sign in to comment.