diff --git a/src/Mpociot/CaptainHook/CaptainHookServiceProvider.php b/src/Mpociot/CaptainHook/CaptainHookServiceProvider.php index f94f611..f9faba6 100644 --- a/src/Mpociot/CaptainHook/CaptainHookServiceProvider.php +++ b/src/Mpociot/CaptainHook/CaptainHookServiceProvider.php @@ -126,7 +126,7 @@ protected function publishSparkResources() protected function registerEventListeners() { foreach ($this->listeners as $eventName) { - $this->app['events']->listen($eventName, [$this, 'handleEvent']); + $this->app['events']->listen($eventName . '*', [$this, 'handleEvent']); } } @@ -201,11 +201,11 @@ public function setConfig($config) /** * Event listener. * + * @param $eventName * @param $eventData */ - public function handleEvent($eventData) + public function handleEvent($eventName, $eventData) { - $eventName = Event::firing(); $webhooks = $this->getWebhooks()->where('event', $eventName); $webhooks = $webhooks->filter($this->config->get('captain_hook.filter', null));