peldax / mobile-detect
Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework
This package's canonical repository appears to be gone and the package has been frozen as a result.
Requires
- php: >=7.0.0
- latte/latte: ~2.3
- mobiledetect/mobiledetectlib: 2.8.*
- nette/application: ~2.3
- nette/di: ~2.3
- nette/http: ~2.3
- nette/utils: ~2.3
Requires (Dev)
- nette/bootstrap: ~2.3
- nette/mail: ~2.3
- nette/robot-loader: ~2.3
- nette/safe-stream: ~2.3
- nette/tester: @dev
- tracy/tracy: @dev
This package is auto-updated.
Last update: 2020-05-08 14:10:21 UTC
README
Extension for detecting mobile devices, managing mobile view types, redirect to mobile version for Nette Framework
Introduction
This extension use 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:
$ composer require ipub/mobile-detect
After that you have to register extension in config.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 class BasePresenter extends Nette\Application\UI\Presenter { use IPub\MobileDetect\TMobileDetect; // Rest of code... }
Documentation
Learn how to get info about visitor device in documentation.
Homepage https://www.ipublikuj.eu and repository http://github.com/iPublikuj/mobile-detect.