protected function loadQueuedServiceProvider($provider, array $options)
    {
        foreach ($options['when'] as $listen) {
            $this->events->listen($listen, function () use ($provider, $options) {
                $this->app->register($options['instance'] ?? $provider);
            });
        }
    }