Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ipublikuj-archive/mobile-detect

Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework (2.4+)
https://github.com/ipublikuj-archive/mobile-detect

device-detection ipub ipublikuj mobile mobile-detect nette nette-extension nette-framework os-detection php php7 php71 php72

Last synced: about 8 hours ago
JSON representation

Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework (2.4+)

Awesome Lists containing this project

README

        

# MobileDetect

[![Build Status](https://img.shields.io/travis/iPublikuj/mobile-detect.svg?style=flat-square)](https://travis-ci.org/iPublikuj/mobile-detect)
[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/iPublikuj/mobile-detect.svg?style=flat-square)](https://scrutinizer-ci.com/g/iPublikuj/mobile-detect/?branch=master)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/iPublikuj/mobile-detect.svg?style=flat-square)](https://scrutinizer-ci.com/g/iPublikuj/mobile-detect/?branch=master)
[![Latest Stable Version](https://img.shields.io/packagist/v/ipub/mobile-detect.svg?style=flat-square)](https://packagist.org/packages/ipub/mobile-detect)
[![Composer Downloads](https://img.shields.io/packagist/dt/ipub/mobile-detect.svg?style=flat-square)](https://packagist.org/packages/ipub/mobile-detect)
[![License](https://img.shields.io/packagist/l/ipub/mobile-detect.svg?style=flat-square)](https://packagist.org/packages/ipub/mobile-detect)

Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for [Nette Framework](http://nette.org/)

## Introduction

This extension use [Mobile_Detect](https://github.com/serbanghita/Mobile-Detect) class and provides the following features:

* Detect the various mobile devices by name, OS, browser User-Agent
* Manages site views for the variuos mobile devices (`mobile`, `phone`, `tablet`, `full`)
* Redirects to mobile and tablet sites

## Installation

The best way to install ipub/mobile-detect is using [Composer](http://getcomposer.org/):

```sh
$ composer require ipub/mobile-detect
```

After that you have to register extension in config.neon.

```neon
extensions:
mobileDetect: IPub\MobileDetect\DI\MobileDetectExtension
```

Package contains trait, which you will have to use in class, where you want to use mobile detector.

```php