protected function registerEvents(ServiceProvider $provider)
    {
        if ( ! isset($this->event)) return;

        foreach ($provider->when() as $event) {
            $this->event->listen($event, function() use ($provider) {
                $this->registerProvider($provider, true);
            });
        }
    }