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

ActiveYii2-extension

israelfl/yii2-ifl-device-detect
===============================

Yii2 extension for Mobile-Detect library

0.0.3(8y ago)063MIT LicensePHP

Since Mar 22Pushed 8y ago1 watchersCompare

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

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

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

[](#yii2-ifl-device-detect)

Yii2 extension for [Mobile-Detect](https://github.com/serbanghita/Mobile-Detect) library.

To use it just require this extension in your `composer.json` file:

```
"israelfl/yii2-ifl-device-detect": "0.0.1",

```

And then add it to your components configuration in Yii2:

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

Some basic detections are available in Yii's `params`:

```
var_dump(Yii::$app->params['devicedetect']);

array (size=3)
  'isMobile' => boolean false
  'isTablet' => boolean false
  'isDesktop' => boolean true
  'os' => string 'android'|'ios'|'wphone'
  'isiOS' => boolean false
  'isAndroid' => boolean true
  'isWindowsPhone' => boolean false
```

You can also use it from anywhere in your code, calling Mobile-Detect's API:

```
/*Detect a mobile device*/
\Yii::$app->devicedetect->isMobile();

/*Detect a tablet device*/
\Yii::$app->devicedetect->isTablet();

/*Check all available methods here: http://demo.mobiledetect.net/ */
```

Or using the an alias:

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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 ~42 days

Total

3

Last Release

3254d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/803bbb75244961665da9da7cc1eb8a8b929c8c293bd9153798c2be118104bb84?d=identicon)[israelfl](/maintainers/israelfl)

---

Tags

phonemobiledesktopyii2extensionwidgetdevicedetecttablet

### Embed Badge

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

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

###  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)
