2017 © Pedro Peláez
 

library mobile-detector

Detect mobile devices and user agents.

image

grottopress/mobile-detector

Detect mobile devices and user agents.

  • Thursday, March 1, 2018
  • by akadusei
  • Repository
  • 1 Watchers
  • 0 Stars
  • 88 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 14 % Grown

The README.md

Mobile Detector

Description

Detect mobile devices and user agents. This is an extension of the Mobile_Detect library, (*1)

Installation

Install via composer: composer require grottopress/mobile-detector, (*2)

Usage

use GrottoPress\Mobile\Detector;

$detector = new Detector();

// Check if is iOS
if ($detector->isiOS()) {
    //
}

// Check if is android
if ($detector->isAndroidOS()) {
    //
}

// Check if is smart device
if ($detector->isSmart()) {
    //
}

// Check if is phone
if ($detector->isPhone()) {
    //
}

// Check if is tablet
if ($detector->isTablet()) {
    //
}

// Check if is Samsung tablet
if ($detector->isSamsungTablet()) {
    //
}

// Detect current device
$device = $detector->getDevice();

// Detect current browser
$browser = $detector->getBrowser();

// Detect current OS
$os = $detector->getOperatingSystem();

// More examples here: https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples

Development

Run tests with composer run test., (*3)

Contributing

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.

The Versions

01/03 2018

dev-master

9999999-dev

Detect mobile devices and user agents.

  Sources   Download

MIT

The Requires

 

The Development Requires

mobile

01/03 2018

dev-dev

dev-dev

Detect mobile devices and user agents.

  Sources   Download

MIT

The Requires

 

The Development Requires

mobile

01/03 2018

0.1.1

0.1.1.0

Detect mobile devices and user agents.

  Sources   Download

MIT

The Requires

 

The Development Requires

mobile

29/09 2017

0.1.0

0.1.0.0

Detect mobile devices and user agents.

  Sources   Download

MIT

The Requires

 

The Development Requires

mobile