I'm making the switch from CodeIgniter to Symfony 2. Can someone please give me an example of how to:
This is now available for free in twig templates (tested on sf2 version 2.0.14)
{{ app.request.getBaseURL() }}
In later Symfony versions (tested on 2.5), try :
{{ app.request.getSchemeAndHttpHost() }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With