PHPackages                             i4erkasov/yii2-device-detect - 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. i4erkasov/yii2-device-detect

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

i4erkasov/yii2-device-detect
============================

Device Detect extension for Yii2

1.0(6y ago)12MITPHPPHP ^7.0

Since Sep 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/i4erkasov/yii2-device-detect)[ Packagist](https://packagist.org/packages/i4erkasov/yii2-device-detect)[ RSS](/packages/i4erkasov-yii2-device-detect/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (2)Used By (0)

yii2-device-detect
==================

[](#yii2-device-detect)

[![Latest Stable Version](https://camo.githubusercontent.com/91e1167e875d069e8520e48c59eb9eca402bf01b7afbb91c5e17646e8d20eb0b/68747470733a2f2f706f7365722e707567782e6f72672f693465726b61736f762f796969322d6465766963652d6465746563742f762f737461626c65)](https://packagist.org/packages/i4erkasov/yii2-device-detect)[![Total Downloads](https://camo.githubusercontent.com/fb74c90da9551f67bd66d71175c9011f7dfa2bb6fb9e7440e48450f53fef8d29/68747470733a2f2f706f7365722e707567782e6f72672f693465726b61736f762f796969322d6465766963652d6465746563742f646f776e6c6f616473)](https://packagist.org/packages/i4erkasov/yii2-device-detect)[![License](https://camo.githubusercontent.com/2a58ad0685c8b235c0a7d93ac5b38cbd40f5a7ba834c530eb9fa15417e987860/68747470733a2f2f706f7365722e707567782e6f72672f693465726b61736f762f796969322d6465766963652d6465746563742f6c6963656e7365)](https://packagist.org/packages/i4erkasov/yii2-device-detect)

Device Detect extension for Yii2"

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Run the following command

```
php composer.phar require --prefer-dist i4erkasov/yii2-device-detect "*"

```

or add the following to the require section of your composer.json file:

```
"i4erkasov/yii2-device-detect": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by :

1. Add `mobileDetect` component to your [Yii2 configuration](http://www.yiiframework.com/doc-2.0/guide-concept-configurations.html#application-configurations)like this:

    ```
    'components' => [
        'device' => [
            'class' => '\i4erkasov\devicedetect\DeviceDetect'
        ]
    ]
    ```
2. Use `DeviceDetect` component as [Mobile\_Detect](http://mobiledetect.net/) PHP class:

    ```
    echo \Yii::$app->device->isMobile();
    echo \Yii::$app->device->isTablet();
    echo \Yii::$app->device->isDesktop();
    ```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2425d ago

### Community

Maintainers

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

---

Top Contributors

[![i4erkasov](https://avatars.githubusercontent.com/u/44391984?v=4)](https://github.com/i4erkasov "i4erkasov (2 commits)")

---

Tags

yii2extensionmobiledetect

### Embed Badge

![Health badge](/badges/i4erkasov-yii2-device-detect/health.svg)

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

###  Alternatives

[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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