Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/larapack/mobiledetect
[No longer maintained] Laravel package for MobileDetect
https://github.com/larapack/mobiledetect
Last synced: about 2 months ago
JSON representation
[No longer maintained] Laravel package for MobileDetect
- Host: GitHub
- URL: https://github.com/larapack/mobiledetect
- Owner: larapack
- License: mit
- Created: 2014-12-01T12:47:41.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T20:51:01.000Z (almost 7 years ago)
- Last Synced: 2024-04-26T02:03:35.908Z (8 months ago)
- Language: PHP
- Homepage: https://ulties.com
- Size: 156 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MobilDetect package for Laravel
[![Build Status](https://travis-ci.org/larapack/mobiledetect.svg)](https://travis-ci.org/larapack/laravel-mobiledetect)
[![Total Downloads](https://poser.pugx.org/larapack/mobiledetect/downloads.svg)](https://packagist.org/packages/larapack/mobiledetect)
[![Latest Stable Version](https://poser.pugx.org/larapack/mobiledetect/v/stable.svg)](https://packagist.org/packages/larapack/mobiledetect)
[![Latest Unstable Version](https://poser.pugx.org/larapack/mobiledetect/v/unstable.svg)](https://packagist.org/packages/larapack/mobiledetect)
[![License](https://poser.pugx.org/larapack/mobiledetect/license.svg)](https://packagist.org/packages/larapack/mobiledetect)Info
====================Version: 1.0
Author: Mark Topper [[Facebook]](https://www.facebook.com/marktopper) [[Github]](https://github.com/marktopper) [[Twitter]](https://www.twitter.com/webmanio/)
Website: [www.webman.io](https://www.webman.io/larapack/mobiledetect)
Email: [[email protected]](mailto:[email protected])### Installation
First add the package to your composer by running command `composer require larapack/mobiledetect 1.*` or by adding the following code to `composer.json` followed by running the command `composer update`:
```
{
"require": {
"larapack/mobiledetect": "1.*"
}
}
```Add the alias to the aliases in your `app/config/app.php`:
```
'aliases' => array(
// ...
'MobileDetect' => 'Larapack\MobileDetect\MobileDetect',
)
```### Usage
The following examples assume you use the MobileDetect class name as alias, but the packages is namespaced so you can name the facade as you wish.
```
$detect = MobileDetect;if ($detect->isMobile()){
// this is a mobile
}
else if ($detect->isTablet()){
// this is a tablet
}if ($detect->isIE()){
// this is IE -.-'
}
```More examples on http://mobiledetect.net/