PHPackages                             gplcart/device - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gplcart/device

ActiveGplcart-module[Utility &amp; Helpers](/categories/utility)

gplcart/device
==============

Allows to detect user's device type (mobile, tablet) and switch to the corresponding theme

021PHP

Since Mar 10Pushed 8y agoCompare

[ Source](https://github.com/gplcart/device)[ Packagist](https://packagist.org/packages/gplcart/device)[ RSS](/packages/gplcart-device/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (1)

[![Build Status](https://camo.githubusercontent.com/de6421a181dd367935e03515050f7b7a30688957f6cd4b0db8e4e175d9756f6b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67706c636172742f6465766963652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gplcart/device/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/962803d9245f7d70e4a67b185dc19126485111c3821f8fbe4b4bc5a355287266/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f67706c636172742f6465766963652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/gplcart/device/?branch=master)

Device Detector is a [GPL Cart](https://github.com/gplcart/gplcart) module that allows to detect user's device type (mobile, tablet) and switch to the corresponding theme. Based on [Mobile Detect](https://github.com/serbanghita/Mobile-Detect) library

**Features**

- Defines user's device type and stores it in the user session
- Optionally switches to a specific theme
- Provides Mobile Detect library for other modules

**Installation**

This module requires 3-d party library which should be downloaded separately. You have to use [Composer](https://getcomposer.org) to download all the dependencies.

1. From your web root directory: `composer require gplcart/device`. If the module was downloaded and placed into `system/modules` manually, run `composer update` to make sure that all 3-d party files are presented in the `vendor` directory.
2. Go to `admin/module/list` end enable the module
3. Adjust settings on `admin/module/settings/device`

To get stored device type in your custom module: $\_SESSION\['device'\]. Available values are: desktop, mobile, tablet

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ad45895ef2d2867dc5294b7581948c79eef568001241d98eaf631bfe9fadeb63?d=identicon)[gplcart](/maintainers/gplcart)

---

Top Contributors

[![gplcart](https://avatars.githubusercontent.com/u/16158956?v=4)](https://github.com/gplcart "gplcart (32 commits)")

### Embed Badge

![Health badge](/badges/gplcart-device/health.svg)

```
[![Health](https://phpackages.com/badges/gplcart-device/health.svg)](https://phpackages.com/packages/gplcart-device)
```

###  Alternatives

[yiiext/nested-set-behavior

AR models behavior that allows to work with nested sets tree.

158122.0k1](/packages/yiiext-nested-set-behavior)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
