resist/device

Simple mobile detector for Symfony + Twig

Maintainers

Details

github.com/resist/device

Source

Issues

Installs: 2 058

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/resist/device

1.0.3 2024-01-03 14:42 UTC

This package is auto-updated.

Last update: 2025-12-03 09:48:35 UTC


README

Simple mobile detector for Symfony + Twig
github.com/resist/device
© resist

Light-weight tool for mobile detection, not for 100% hit rate. Mobile detection based on Fat Free Framework's Audit class.

Install:

composer require resist/device

Usage

Use Device as injected service and call isMobile(): bool.

Register optinal Twig is_mobile() function as extension:

# config/service.yaml

resist\Device\Device:
resist\Device\TwigDevice:
        tags: [ 'twig.extension' ]