protected function createProviderInstance($provider)
    {
        if (! $this->isProviderAliasExists($provider)) {
            throw new InvalidArgumentException("File provider [{$provider}] is invalid.");
        }

        if (! isset($this->resolvedProviders[$provider])) {
            $this->resolvedProviders[$provider] = isset($this->customProviders[$provider])
                ? $this->callCustomProvider($provider)
                : $this->app->make($this->providers[$provider]);
        }

        return $this->resolvedProviders[$provider];
    }