2017 © Pedro Peláez
 

yii2-extension yii2-component-devicedetect

An Yii2 component for detect device

image

lulubin/yii2-component-devicedetect

An Yii2 component for detect device

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

1.Install

composer require --prefer-dist lulubin/yii2-component-devicedetect "dev-master", (*1)

2.configuration

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

3.Usage

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'

The Versions

10/04 2018

dev-master

9999999-dev https://github.com/lulubin/yii2-component-devicedetect

An Yii2 component for detect device

  Sources   Download

BSD 3-Clause

The Requires

 

component extension yii2 widget mobile phone detect desktop device tablet