Skip to content

Commit 68d10c6

Browse files
committed
Initial commit 🚀️
0 parents  commit 68d10c6

File tree

6 files changed

+125
-0
lines changed

6 files changed

+125
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.sublime-project
2+
*.sublime-workspace
3+
vendor

LICENSE

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

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Sentry for Laravel
2+
3+
Laravel wrapper for the [ipdata.co](https://ipdata.co) API.
4+
5+
## Installation
6+
7+
You can install the package via composer:
8+
9+
composer require kielabokkie/laravel-ipdata
10+
11+
If you are on Laravel 5.4 or lower, you should add the following to your `config/app.php`:
12+
13+
```php
14+
'providers' => [
15+
// ...
16+
Kielabokkie\LaravelIpdata\IpdataServiceProvider::class,
17+
]
18+
19+
'aliases' => [
20+
// ...
21+
'Ipdata' => Kielabokkie\LaravelIpdata\Facades\Ipdata::class,
22+
)
23+
```

composer.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "kielabokkie/laravel-ipdata",
3+
"description": "Laravel wrapper for kielabokkie/ipdata-php",
4+
"type": "library",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Wouter Peschier",
9+
"email": "kielabokkie@gmail.com"
10+
}
11+
],
12+
"require": {
13+
"php": ">=7.1",
14+
"kielabokkie/ipdata": "^0.2"
15+
},
16+
"autoload": {
17+
"psr-4": {
18+
"Kielabokkie\\LaravelIpdata\\": "src/Kielabokkie/"
19+
}
20+
},
21+
"extra": {
22+
"laravel": {
23+
"providers": [
24+
"Kielabokkie\\LaravelIpdata\\IpdataServiceProvider"
25+
],
26+
"aliases": {
27+
"Ipdata": "Kielabokkie\\LaravelIpdata\\Facades\\Ipdata"
28+
}
29+
}
30+
}
31+
}

src/Kielabokkie/Facades/Ipdata.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
namespace Kielabokkie\LaravelIpdata\Facades;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
class Ipdata 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 'ipdata';
17+
}
18+
}
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace Kielabokkie\LaravelIpdata;
4+
5+
use Illuminate\Support\Facades\App;
6+
use Illuminate\Support\ServiceProvider;
7+
8+
class IpdataServiceProvider extends ServiceProvider
9+
{
10+
/**
11+
* Bootstrap the application services.
12+
*
13+
* @return void
14+
*/
15+
public function boot()
16+
{
17+
//
18+
}
19+
20+
/**
21+
* Register the application services.
22+
*
23+
* @return void
24+
*/
25+
public function register()
26+
{
27+
App::bind('ipdata', function () {
28+
return new \Kielabokkie\Ipdata;
29+
});
30+
}
31+
}

0 commit comments

Comments
 (0)