Download the PHP package xutl/yii2-device-detect without Composer
On this page you can find all versions of the php package xutl/yii2-device-detect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package yii2-device-detect
yii2-device-detect
Yii2 extension for Mobile-Detect library.
To use it just require this extension in your composer.json
file:
"xutl/yii2-device-detect": "1.0.0",
And then add it to your components configuration in Yii2:
'bootstrap' => ['devicedetect'],
'components' => [
'devicedetect' => [
'class' => 'xutl\devicedetect\DeviceDetect'
],
]
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/ */
All versions of yii2-device-detect with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2 Version
~2.0.6
piwik/device-detector Version ^3.9
mobiledetect/mobiledetectlib Version ^2.8
piwik/device-detector Version ^3.9
mobiledetect/mobiledetectlib Version ^2.8
The package xutl/yii2-device-detect contains the following files
Loading the files please wait ....