Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slvler/whoami
Ip API for Laravel applications
https://github.com/slvler/whoami
Last synced: 17 days ago
JSON representation
Ip API for Laravel applications
- Host: GitHub
- URL: https://github.com/slvler/whoami
- Owner: slvler
- License: mit
- Created: 2024-06-29T18:08:33.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-10-20T21:24:18.000Z (24 days ago)
- Last Synced: 2024-10-21T01:54:50.450Z (24 days ago)
- Language: PHP
- Homepage:
- Size: 11.7 KB
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# slvler - Ip-api Service
[![tests](https://github.com/slvler/whoami/actions/workflows/tests.yml/badge.svg)](https://github.com/slvler/whoami/actions/workflows/tests.yml)
[![Latest Stable Version](https://poser.pugx.org/slvler/whoami/v)](https://packagist.org/packages/slvler/whoami)
[![Latest Unstable Version](https://poser.pugx.org/slvler/whoami/v/unstable)](https://packagist.org/packages/slvler/whoami)
[![License](https://poser.pugx.org/slvler/whoami/license)](https://packagist.org/packages/slvler/whoami)
[![Total Downloads](https://poser.pugx.org/slvler/whoami/downloads)](https://packagist.org/packages/slvler/whoami)This package provides a convenient wrapper to the [Ip API](https://ip-api.com/docs) for Laravel applications.
## Requirements
- PHP 8.0+
- Laravel 10.x | 9.x
## Installation
To install this package tou can use composer:
```bash
composer require slvler/whoami
```
## Usage
### Import the facade in your class.
```php
use Whoami;
```
### send a request to get ip information details
```php
Whoami::get("127.0.0.1")->result();
```
### send a request to filter some details in the ip information
```php
Whoami::get("127.0.0.1")->filter(['status','message','country','zip','query'])->result();
```
### Testing
```bash
composer test
```
## Credits
- [slvler](https://github.com/slvler)
## License
The MIT License (MIT). Please see [License File](https://github.com/slvler/whoami/blob/main/LICENSE.md) for more information.