Using Symfony2, I need to check in the controller wether I am being called from a mobile device or from a desktop web browser.
Depending on the origin of the request, render different twig templates according to the screen sizes and conditions.
What would be a good approach to do this? What do we have in the Controller to check this?
I’m sure Symfony has some wrapped command to do this as well but:
will give you the
user-agentstring which tents to have a string “Android verNum”.