Skip to content

Commit dfc6aa5

Browse files
Initial Commit
0 parents  commit dfc6aa5

File tree

11 files changed

+260
-0
lines changed

11 files changed

+260
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
All Notable changes to `laravel-identify` will be documented in this file
4+
5+
## 2015-11-04
6+
- Initial release

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/unicodeveloper/laravel-imanee).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23+
24+
25+
## Running Tests
26+
27+
``` bash
28+
$ composer test
29+
```
30+
31+
32+
**Happy coding**!

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2015 Prosper Otemuyiwa <prosperotemuyiwa@gmail.com>
4+
5+
> Permission is hereby granted, free of charge, to any person obtaining a copy
6+
> of this software and associated documentation files (the "Software"), to deal
7+
> in the Software without restriction, including without limitation the rights
8+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
> copies of the Software, and to permit persons to whom the Software is
10+
> furnished to do so, subject to the following conditions:
11+
>
12+
> The above copyright notice and this permission notice shall be included in
13+
> all copies or substantial portions of the Software.
14+
>
15+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
> THE SOFTWARE.

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# laravel-identify
2+
3+
[![Latest Stable Version](https://poser.pugx.org/unicodeveloper/laravel-identify/v/stable.svg)](https://packagist.org/packages/unicodeveloper/laravel-identify)
4+
![](https://img.shields.io/badge/unicodeveloper-approved-brightgreen.svg)
5+
[![License](https://poser.pugx.org/unicodeveloper/laravel-identify/license.svg)](LICENSE.md)
6+
[![Build Status](https://img.shields.io/travis/unicodeveloper/laravel-identify.svg)](https://travis-ci.org/unicodeveloper/laravel-identify)
7+
[![Quality Score](https://img.shields.io/scrutinizer/g/unicodeveloper/laravel-identify.svg?style=flat-square)](https://scrutinizer-ci.com/g/unicodeveloper/laravel-identify)
8+
[![Total Downloads](https://img.shields.io/packagist/dt/unicodeveloper/laravel-identify.svg?style=flat-square)](https://packagist.org/packages/unicodeveloper/laravel-identify)
9+
10+
> Laravel 5 Package to identify a User's Browser, Operating System, Language and Device
11+
12+
## Installation
13+
14+
[PHP](https://php.net) 5.4+ or [HHVM](http://hhvm.com) 3.3+, and [Composer](https://getcomposer.org) are required.
15+
16+
To get the latest version of Laravel Imanee, simply add the following line to the require block of your `composer.json` file.
17+
18+
```
19+
"unicodeveloper/laravel-identify": "1.0.*"
20+
```
21+
22+
You'll then need to run `composer install` or `composer update` to download it and have the autoloader updated.
23+
24+
Once Laravel Imanee is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.
25+
26+
* `Unicodeveloper\Identify\IdentifyServiceProvider::class`
27+
28+
You can also use a Facade which provides a fluent way of manipulating images
29+
30+
```php
31+
'aliases' => [
32+
...
33+
'Identify' => Unicodeveloper\Identify\Facades\IdentifyFacade::class,
34+
...
35+
]
36+
```
37+
38+
## Configuration
39+
40+
To get started, you'll need to publish all vendor assets:
41+
42+
```bash
43+
$ php artisan vendor:publish --provider="Unicodeveloper\Identify\IdentifyServiceProvider"
44+
```
45+
46+
## Usage
47+
48+
49+
## Contributing
50+
51+
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
52+
53+
54+
## How can I thank you?
55+
56+
Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!
57+
58+
Don't forget to [follow me on twitter](https://twitter.com/unicodeveloper)!
59+
60+
Thanks!
61+
Prosper Otemuyiwa.
62+
63+
## License
64+
65+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "unicodeveloper/laravel-identify",
3+
"description": "A Laravel 5 Package Provider to Identify/detect a user's browser, device, operating system and Language",
4+
"keywords": ["github", "laravel","Open Source","Evangelist", "Detect", "Identify", "Browser", "Operating System", "Language"],
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "unicodeveloper",
9+
"email": "prosperotemuyiwa@gmail.com"
10+
}
11+
],
12+
"minimum-stability": "dev",
13+
"require": {
14+
"php": ">=5.5.9",
15+
"illuminate/support": "5.2.*"
16+
}
17+
}

phpunit.xml.dist

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit bootstrap="vendor/autoload.php"
3+
backupGlobals="false"
4+
backupStaticAttributes="false"
5+
colors="true"
6+
verbose="true"
7+
convertErrorsToExceptions="true"
8+
convertNoticesToExceptions="true"
9+
convertWarningsToExceptions="true"
10+
processIsolation="false"
11+
stopOnFailure="false">
12+
<testsuites>
13+
<testsuite name="laravel-identify Test Suite">
14+
<directory>tests</directory>
15+
</testsuite>
16+
</testsuites>
17+
<filter>
18+
<whitelist>
19+
<directory suffix=".php">src/</directory>
20+
</whitelist>
21+
</filter>
22+
<logging>
23+
<log type="tap" target="build/report.tap"/>
24+
<log type="junit" target="build/report.junit.xml"/>
25+
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
26+
<log type="coverage-text" target="build/coverage.txt"/>
27+
<log type="coverage-clover" target="build/logs/clover.xml"/>
28+
</logging>
29+
</phpunit>

src/Exceptions/IdentifyException.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Unicodeveloper\Identify\Exceptions;
4+
5+
use Exception;
6+
7+
/**
8+
* An exception
9+
*/
10+
class IdentifyException extends Exception
11+
{
12+
13+
}

src/Facades/IdentityFacade.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
namespace Unicodeveloper\Identify\Facades;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
class IdentifyFacade extends Facade {
8+
9+
/**
10+
* Get the registered name of the component.
11+
*
12+
* @return string
13+
*/
14+
protected static function getFacadeAccessor()
15+
{
16+
return 'laravel-identify';
17+
}
18+
}
19+
20+

src/Identify.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Unicodeveloper\Imanee;
4+
5+
class Identify {
6+
7+
}

src/IdentifyServiceProvider.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
namespace Unicodeveloper\Identify;
4+
5+
use Illuminate\Support\ServiceProvider;
6+
7+
class IdentifyServiceProvider extends ServiceProvider {
8+
9+
/*
10+
* Indicates if loading of the provider is deferred.
11+
*
12+
* @var bool
13+
*/
14+
protected $defer = false;
15+
16+
/**
17+
* Register the application services.
18+
*
19+
* @return void
20+
*/
21+
public function register()
22+
{
23+
$this->app->bind('laravel-identify', 'Unicodeveloper\Identify\Identify');
24+
}
25+
26+
/**
27+
* Get the services provided by the provider
28+
* @return array
29+
*/
30+
public function provides()
31+
{
32+
return ['laravel-identify'];
33+
}
34+
}

0 commit comments

Comments
 (0)