yii2-extension yii2-mobile-detect
Mobile Detect extension for Yii2
skeeks/yii2-mobile-detect
Mobile Detect extension for Yii2
- Tuesday, June 30, 2015
- by skeeks-semenov
- Repository
- 2 Watchers
- 1 Stars
- 31,325 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 1 Open issues
- 3 Versions
- 14 % Grown
Mobile Detect extension for Yii2
This extension provides an Yii2 component wrapper for Mobile_Detect PHP class and
can be used to detect whether a device is mobile one in your Yii2 application., (*1)
, (*2)
Installation
The preferred way to install this extension is through Composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist skeeks/yii2-mobile-detect
or add, (*5)
"skeeks/yii2-mobile-detect": "^1.0.2"
to the require
section of your composer.json
file., (*6)
Usage
-
Add mobileDetect
component to your Yii2 configuration
like this:, (*7)
'components' => [
'mobileDetect' => [
'class' => '\skeeks\yii2\mobiledetect\MobileDetect'
]
]
-
Use mobileDetect
component as Mobile_Detect PHP class:, (*8)
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 CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com, (*9)
dev-master
9999999-dev
Mobile Detect extension for Yii2
Sources
Download
BSD-3-Clause
The Requires
by
Semenov Alexander
extension
yii2
mobiledetect
1.0.1
1.0.1.0
Mobile Detect extension for Yii2
Sources
Download
BSD-3-Clause
The Requires
by
Semenov Alexander
extension
yii2
mobiledetect
1.0.0
1.0.0.0
Mobile Detect extension for Yii2
Sources
Download
BSD-3-Clause
The Requires
by
Semenov Alexander
extension
yii2
mobiledetect