Simple user agent detection for OctoberCMS.
This plugin is just a simple Twig wrapper for Laravel User Agent, please refer to their repository for documentation.
Detecting devices...
{% if agent('isDesktop') %}
You're using a desktop!
{% elseif agent('isTablet') %}
You're using a tablet!
{% elseif agent('isMobile') %}
You're using a mobile device!
{% endif %}
Detecting robots...
{% if agent('isRobot') %}
Hello robot!
{% endif %}
Detecting a specific browser...
{% if agent('browser') == 'Chrome' %}
Welcome Chrome user!
{% endif %}
Detecting a specific device...
{% if agent('device') == 'iPhone' %}
Aloha iPhone user!
{% endif %}