Skip to content

Commit

Permalink
fix: fix event not registered
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ckbon3 committed Jan 25, 2020
1 parent cf43436 commit 9ad0564
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/BimaClientServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@
use Bima\Client\Listener\SendQueryEvent;
use Illuminate\Database\Events\QueryExecuted;
use Illuminate\Support\ServiceProvider;
use Pandawa\Component\Module\AbstractModule;
use Pandawa\Component\Module\Provider\EventProviderTrait;
use Event;

/**
* @author Iqbal Maulana <iq.bluejack@gmail.com>
*/
final class BimaClientServiceProvider extends ServiceProvider
{
use EventProviderTrait;

public function boot(): void
{
$this->publishes(
Expand All @@ -33,6 +30,12 @@ public function boot(): void
],
'bima'
);

foreach ($this->listens() as $event => $listeners) {
foreach ($listeners as $listener) {
Event::listen($event, $listener);
}
}
}

public function register(): void
Expand Down

0 comments on commit 9ad0564

Please sign in to comment.