Retrieve the current url in Twig

Hi,

How can I retrieve the current url in Twig? Im using slim 3.
I saw the $container->get(‘request’)->getUri(), this I think should get the value, but uncertain how to implement inside twig

class ViewServiceProvider

class ViewServiceProvider extends AbstractServiceProvider {

    protected $provides = [
        View::class
    ];

    public function register() {
        $container = $this->getContainer();

        $config = $container->get('config');

        $container->share(View::class, function () use ($config, $container) {

            $loader = new FilesystemLoader(base_path('resources/views'));

            $twig = new Environment($loader, [
                'cache' => $config->get('twig.cache'),
                'debug' => $config->get('twig.debug')
            ]);

            $twig->addExtension(new RouteExtension(
                            $container->get('router'),
                            $container->get('request')->getUri()
            ));

            $twig->addExtension(new DebugExtension);


            $twig->addFilter(new TwigFilter('json_decode', function ($string) {

                        $result = json_decode($string, true);

//                        if (env('APP_TWIG_DEBUG') == 'true') {
//                            dump($result);
//                        }
                        return $result;
                    }));


            foreach ($config->get('twig.globals') as $key => $value) {
                $twig->addGlobal($key, $value);
            }

            return new View($twig);
        });
    }

}

twig globals

return [
    'twig' => [
        'cache' => env('APP_ENV') === 'dev' ? false : base_path('storage/cache'),
        'debug' => env('APP_TWIG_DEBUG') === 'true',
        'globals' => [
            'app_name' => env('APP_NAME')
                     
        ],
        'extensions' => [
        //
        ],
    ],
];

The Twig-View v2 component (for Slim 3) provides a TwigExtension with helper functions like: path_for

thanks Odan, will try,