public function resolveDispatchDependencies(Router $driver, $name, array $parameters)
    {
        $segments = $this->getNestedParameters($name, $parameters);
        $key      = implode('.', array_keys($segments));
        $uses     = $driver->get('uses');

        if (! is_null($name)) {
            if (isset($driver[$key]) && Str::startsWith($driver[$key], 'resource:')) {
                $uses = $driver[$key];
            } else {
                $uses = (isset($driver[$name]) ? $driver[$name] : null);
            }
        }

        return new Resolver($uses, $this->request->getMethod(), $parameters, $segments);
    }