Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,34 @@ Next, run the Composer update comand
Add the service provider to app/config/app.php, within the providers array.

```php
'providers' => array(
'providers' => [
// ...
'Fuhrmann\LarageoPlugin\ServiceProvider',
),
],
```

In the same file `config/app.php` add the alias:

```php
'aliases' => array(
'aliases' => [
//...
'LarageoPlugin' => 'Fuhrmann\LarageoPlugin\Facade',
),
],
```

### Usage

You can specify an IP:

```php
$info = LarageoPlugin::getInfo('177.34.13.248'); // get info from a IP
$info = LarageoPlugin->getInfo('177.34.13.248'); // get info from a IP
var_dump($info);
```

Or use it without any param:

```php
$info = LarageoPlugin::getInfo(); // get info from the IP of the user acessing the page
$info = LarageoPlugin->getInfo(); // get info from the IP of the user acessing the page
var_dump($info);
```

Expand Down Expand Up @@ -80,7 +80,7 @@ This is the output:
Another useful example: You can also just return one field, e.g. city from in one call:

```php
$userCity = LarageoPlugin::getInfo()->geoplugin_city; // get the city from the user IP
$userCity = LarageoPlugin->getInfo()->geoplugin_city; // get the city from the user IP
var_dump($userCity);
```

Expand Down