Skip to content

Commit

Permalink
Initial commit 🚀️
Browse files Browse the repository at this point in the history
  • Loading branch information
kielabokkie committed May 21, 2018
0 parents commit 68d10c6
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.sublime-project
*.sublime-workspace
vendor
19 changes: 19 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2018 Wouter Peschier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Sentry for Laravel

Laravel wrapper for the [ipdata.co](https://ipdata.co) API.

## Installation

You can install the package via composer:

composer require kielabokkie/laravel-ipdata

If you are on Laravel 5.4 or lower, you should add the following to your `config/app.php`:

```php
'providers' => [
// ...
Kielabokkie\LaravelIpdata\IpdataServiceProvider::class,
]

'aliases' => [
// ...
'Ipdata' => Kielabokkie\LaravelIpdata\Facades\Ipdata::class,
)
```
31 changes: 31 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "kielabokkie/laravel-ipdata",
"description": "Laravel wrapper for kielabokkie/ipdata-php",
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Wouter Peschier",
"email": "[email protected]"
}
],
"require": {
"php": ">=7.1",
"kielabokkie/ipdata": "^0.2"
},
"autoload": {
"psr-4": {
"Kielabokkie\\LaravelIpdata\\": "src/Kielabokkie/"
}
},
"extra": {
"laravel": {
"providers": [
"Kielabokkie\\LaravelIpdata\\IpdataServiceProvider"
],
"aliases": {
"Ipdata": "Kielabokkie\\LaravelIpdata\\Facades\\Ipdata"
}
}
}
}
18 changes: 18 additions & 0 deletions src/Kielabokkie/Facades/Ipdata.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Kielabokkie\LaravelIpdata\Facades;

use Illuminate\Support\Facades\Facade;

class Ipdata extends Facade
{
/**
* Get the registered name of the component.
*
* @return string
*/
protected static function getFacadeAccessor()
{
return 'ipdata';
}
}
31 changes: 31 additions & 0 deletions src/Kielabokkie/IpdataServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Kielabokkie\LaravelIpdata;

use Illuminate\Support\Facades\App;
use Illuminate\Support\ServiceProvider;

class IpdataServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
//
}

/**
* Register the application services.
*
* @return void
*/
public function register()
{
App::bind('ipdata', function () {
return new \Kielabokkie\Ipdata;
});
}
}

0 comments on commit 68d10c6

Please sign in to comment.