PHPackages                             lulubin/yii2-component-devicedetect - 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. lulubin/yii2-component-devicedetect

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

lulubin/yii2-component-devicedetect
===================================

An Yii2 component for detect device

1.0.1(5mo ago)04MITPHP

Since Dec 5Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/lulubin/yii2-component-devicedetect)[ Packagist](https://packagist.org/packages/lulubin/yii2-component-devicedetect)[ Docs](https://github.com/lulubin/yii2-component-devicedetect)[ RSS](/packages/lulubin-yii2-component-devicedetect/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (2)Used By (0)

1.Install
---------

[](#1install)

composer require --prefer-dist lulubin/yii2-component-devicedetect "dev-master"

2.configuration
---------------

[](#2configuration)

```
'bootstrap' => ['devicedetect'],
'components' => [
	'devicedetect' => [
		'class' => 'lulubin\devicedetect\DeviceDetect'
	],
]
```

3.Usage
-------

[](#3usage)

```
var_dump(Yii::$app->params['devicedetect']);
array (size=3)
  'isMobile' => boolean false
  'isTablet' => boolean false
  'isDesktop' => boolean true
```

```
var_dump(Yii::$app->devicedetect->isMobile());
var_dump(Yii::$app->devicedetect->isTablet());
/*Check all available methods here: http://demo.mobiledetect.net/ */
```

```
var_dump(Yii::getAlias('@device')); //return 'mobile', 'tablet' or 'desktop'
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance72

Regular maintenance activity

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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

158d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38f0f8abc454bb4b20dac2a2221c0bbe12e8c39dde9a5312874b297954fbc744?d=identicon)[lulubin](/maintainers/lulubin)

---

Top Contributors

[![lulubin](https://avatars.githubusercontent.com/u/15922843?v=4)](https://github.com/lulubin "lulubin (3 commits)")

---

Tags

phonemobiledesktopyii2extensionwidgetcomponentdevicedetecttablet

### Embed Badge

![Health badge](/badges/lulubin-yii2-component-devicedetect/health.svg)

```
[![Health](https://phpackages.com/badges/lulubin-yii2-component-devicedetect/health.svg)](https://phpackages.com/packages/lulubin-yii2-component-devicedetect)
```

###  Alternatives

[alexandernst/yii2-device-detect

Yii2 extension for Mobile-Detect library

141846.2k3](/packages/alexandernst-yii2-device-detect)[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)
