2017 © Pedro Peláez
 

yii2-extension yii2-device-detect

Yii2 extension for Mobile-Detect library

image

alexandernst/yii2-device-detect

Yii2 extension for Mobile-Detect library

  • Monday, August 7, 2017
  • by alexandernst
  • Repository
  • 11 Watchers
  • 108 Stars
  • 110,354 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 36 Forks
  • 1 Open issues
  • 13 Versions
  • 10 % Grown

The README.md

yii2-device-detect

Yii2 extension for Mobile-Detect library., (*1)

To use it just require this extension in your composer.json file:, (*2)

"alexandernst/yii2-device-detect": "0.0.12",

And then add it to your components configuration in Yii2:, (*3)

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

Some basic detections are available in Yii's params:, (*4)

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

array (size=3)
  'isMobile' => boolean false
  'isTablet' => boolean false
  'isDesktop' => boolean true

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

/*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:, (*6)

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

The Versions

07/08 2017

dev-master

9999999-dev

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

07/08 2017

0.0.12

0.0.12.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

04/05 2016

0.0.11

0.0.11.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

30/03 2016

0.0.10

0.0.10.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

23/04 2015

0.0.9

0.0.9.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

02/04 2015

0.0.8

0.0.8.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

31/03 2015

0.0.7

0.0.7.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

31/03 2015

0.0.6

0.0.6.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

26/03 2015

0.0.5

0.0.5.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

26/03 2015

0.0.4

0.0.4.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

26/03 2015

0.0.3

0.0.3.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

26/03 2015

0.0.2

0.0.2.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet

26/03 2015

0.0.1

0.0.1.0

Yii2 extension for Mobile-Detect library

  Sources   Download

GNU General Public License v3

The Requires

 

by Alexander Nestorov

extension yii2 widget mobile phone detect desktop device tablet