src/Container.php
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);
            });
        }
    }
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);
            });
        }
    }
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 ) ; } ) ; } }
Register the events that register the specified provider

@param ServiceProvider $provider The service provider object.
@return void
Register the events that register the specified provider