Get the path from route

Can anyone please tell me how do I get the full path of a page from the route?

With twig, you can simply type {{ page.url(true) }}

I was able to get it actually using the path() function. Thanks :slight_smile: