Getting the Request URL in Slim Framework

December 11th 2013

When you're creating a web application, you'll no doubt at some point need to get the raw request URL.

I've already covered how to get the current url in Zend Framework

In Slim Framework, it's rather simple. To get the REQUEST_URI (request url) from the app object, you can use:

PHP Code:
<?php
$app
->request()->getPath();

Once you get into Slim a bit more, you can work on extending the view, and writing a few more advanced methods.