Yii2 extension for Mobile-Detect library

Installs: 430

Dependents: 0

Suggesters: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0


0.0.1 2016-08-03 07:32 UTC


Yii2 extension for Mobile-Detect library.

To use it just require this extension in your composer.json file:

"alikdex/yii2-device-detect": "0.0.1",

And then add it to your components configuration in Yii2:

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

Some basic detections are available in Yii's params:


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:

/*Detect a mobile device*/

/*Detect a tablet device*/

/*Check all available methods here: */