xutl/yii2-device-detect
最新稳定版本:1.0.0
Composer 安装命令:
composer require xutl/yii2-device-detect
包简介
The device detect module for Yii.
关键字:
README 文档
README
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/ */
统计信息
- 总下载量: 242
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-11-28