PHPackages                             skeeks/yii2-mobile-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. skeeks/yii2-mobile-detect

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

skeeks/yii2-mobile-detect
=========================

Mobile Detect extension for Yii2

1.0.2(6y ago)3255.5k↓21.9%63BSD-3-ClausePHP

Since Jun 30Pushed 6y ago2 watchersCompare

[ Source](https://github.com/skeeks-semenov/yii2-mobile-detect)[ Packagist](https://packagist.org/packages/skeeks/yii2-mobile-detect)[ RSS](/packages/skeeks-yii2-mobile-detect/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (4)Used By (3)

Mobile Detect extension for Yii2
================================

[](#mobile-detect-extension-for-yii2)

This extension provides an Yii2 component wrapper for [Mobile\_Detect](http://mobiledetect.net/) PHP class and can be used to detect whether a device is mobile one in your Yii2 application.

[![Latest Stable Version](https://camo.githubusercontent.com/f0278354a2198935cfe95a4af4e7e755125708069db45712e5e09182075be73a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736b65656b732f796969322d6d6f62696c652d6465746563742e737667)](https://packagist.org/packages/skeeks/yii2-mobile-detect)[![Total Downloads](https://camo.githubusercontent.com/ebf91faac3fb864bf53d69d3769f6e8e73cf774e771a92a308902050b4562c5e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736b65656b732f796969322d6d6f62696c652d6465746563742e737667)](https://packagist.org/packages/skeeks/yii2-mobile-detect)

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist skeeks/yii2-mobile-detect

```

or add

```
"skeeks/yii2-mobile-detect": "^1.0.2"
```

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

Usage
-----

[](#usage)

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

    ```
    'components' => [
        'mobileDetect' => [
            'class' => '\skeeks\yii2\mobiledetect\MobileDetect'
        ]
    ]
    ```
2. Use `mobileDetect` component as [Mobile\_Detect](http://mobiledetect.net/) PHP class:

    ```
    echo \Yii::$app->mobileDetect->isMobile();
    echo \Yii::$app->mobileDetect->isTablet();
    echo \Yii::$app->mobileDetect->isDesctop();
    ```

    ```
    //version >= 1.0.1
    echo \skeeks\yii2\mobiledetect\MobileDetect::getInstance()->isMobile();
    ```

---

> [![skeeks!](https://camo.githubusercontent.com/e80b006782c0ce0ce23f8e2e2530130e856f2f49c6a5a8e0e15eaf0c87d25d7b/68747470733a2f2f736b65656b732e636f6d2f696d672f6c6f676f2f6c6f676f2d6e6f2d7469746c652d383070782e706e67)](https://skeeks.com)
> *SkeekS CMS (Yii2) — quickly, easily and effectively!*
> [skeeks.com](https://skeeks.com) | [cms.skeeks.com](https://cms.skeeks.com)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

Every ~740 days

Total

3

Last Release

2496d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/785306737dd13e3ea6826dfc04ab29ececa88f560d054ff595d64853cb878219?d=identicon)[skeeks-semenov](/maintainers/skeeks-semenov)

---

Top Contributors

[![skeeks-semenov](https://avatars.githubusercontent.com/u/9209305?v=4)](https://github.com/skeeks-semenov "skeeks-semenov (12 commits)")

---

Tags

yii2extensionmobiledetect

### Embed Badge

![Health badge](/badges/skeeks-yii2-mobile-detect/health.svg)

```
[![Health](https://phpackages.com/badges/skeeks-yii2-mobile-detect/health.svg)](https://phpackages.com/packages/skeeks-yii2-mobile-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)
