PHPackages                             dkeeper/yii2-mobiledetect - 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. dkeeper/yii2-mobiledetect

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

dkeeper/yii2-mobiledetect
=========================

Detect type of device by information from request

740.8k↑137.7%3[1 issues](https://github.com/DKeeper/yii2-mobiledetect/issues)PHP

Since Aug 26Pushed 11y ago4 watchersCompare

[ Source](https://github.com/DKeeper/yii2-mobiledetect)[ Packagist](https://packagist.org/packages/dkeeper/yii2-mobiledetect)[ RSS](/packages/dkeeper-yii2-mobiledetect/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Mobile detector
===============

[](#mobile-detector)

Detect type of device by information from request.

Notes
-----

[](#notes)

This extension based on mobiledetect project .

See \[here\] () and \[here\] () for more documentation and examples.

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

[](#installation)

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

Either run

```
php composer.phar require --prefer-dist dkeeper/yii2-mobiledetect "*"

```

or add

```
"dkeeper/yii2-mobiledetect": "*"

```

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

Usage
-----

[](#usage)

Update config file *config/web.php* or *common/main.php*:

```
return [
    ...
    'components' => [
        'mobiledetect' => [
            'class' => 'dkeeper\mobiledetect\Detect',
        ],
    ],
    ...
];
```

Set event handler for detect type of device before run Application

```
// path/to/web/index.php
$application = new yii\web\Application($config);

Yii::$app->on(\yii\base\Application::EVENT_BEFORE_REQUEST,function($event){
    Yii::$app->params['detect'] = [
        'isMobile' => Yii::$app->mobiledetect->isMobile(),
        'isTablet' => Yii::$app->mobiledetect->isTablet(),
    ];
});

$application->run();
```

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community11

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/8932cc736f971b23d7db26c36c9a71639e8cbdadc3bc95a348d970b5a5c8798d?d=identicon)[DKeeper](/maintainers/DKeeper)

---

Top Contributors

[![DKeeper](https://avatars.githubusercontent.com/u/1589751?v=4)](https://github.com/DKeeper "DKeeper (6 commits)")

### Embed Badge

![Health badge](/badges/dkeeper-yii2-mobiledetect/health.svg)

```
[![Health](https://phpackages.com/badges/dkeeper-yii2-mobiledetect/health.svg)](https://phpackages.com/packages/dkeeper-yii2-mobiledetect)
```

###  Alternatives

[symfony/ai-bundle

Integration bundle for Symfony AI components

29184.2k4](/packages/symfony-ai-bundle)[selvinortiz/doxter

Slick markdown editor and smart text parser.

248.9k](/packages/selvinortiz-doxter)

PHPackages © 2026

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