PHPackages                             sicaboy/ip2country-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sicaboy/ip2country-laravel

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sicaboy/ip2country-laravel
==========================

Laravel Client for ip2country

0.1(3y ago)09MITPHPPHP ^7.2|^8.0CI failing

Since Jan 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sicaboy/ip2country-laravel)[ Packagist](https://packagist.org/packages/sicaboy/ip2country-laravel)[ Docs](https://github.com/sicaboy/ip2country-laravel)[ RSS](/packages/sicaboy-ip2country-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Laravel Client for ip2country
=============================

[](#laravel-client-for-ip2country)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e41250f1e592767f4b1968e1428c13a56b54cb5643a1ce7788bf31f2f2eedb29/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696361626f792f697032636f756e7472792d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sicaboy/ip2country-laravel)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f3a66b0b1ea2747ecbae06454e5e18a0e1791db18b020322d24ff93e7382c7d3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73696361626f792f697032636f756e7472792d6c61726176656c2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/sicaboy/ip2country-laravel/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/72ec7c869a93febae7b84667d4851d7adaac843220ac2a9cdfd1613c1a60e128/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73696361626f792f697032636f756e7472792d6c61726176656c2f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/sicaboy/ip2country-laravel/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ce1ea7b57c0bad623c5ef4a7748cd1070cbb143486d0fee4b0aa62ab170f92f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696361626f792f697032636f756e7472792d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sicaboy/ip2country-laravel)

Laravel Client for [ip2country](https://github.com/sicaboy/ip2country)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require sicaboy/ip2country-laravel
```

You can publish the config file with:

```
php artisan vendor:publish --tag="ip2country-laravel-config"
```

This is the contents of the published config file:

```
return [
    'api_key' => env('IP2COUNTRY_API_KEY'),
    'api_url' => env('IP2COUNTRY_API_URL', 'https://ip2country.yourdomain.com'),
];
```

Usage
-----

[](#usage)

```
use Sicaboy\Ip2countryLaravel\Facades\Ip2country;

Ip2countryLaravel::getCountryCode('1.1.1.1');
Ip2countryLaravel::getCountryCode(request()->ip())
```

You will get the country code of the IP address.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [sicaboy](https://github.com/sicaboy)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1228d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e2951851fcef464f5f5745cac87603ddd3675ba9f92623c5156a6073e499e28?d=identicon)[sicaboy](/maintainers/sicaboy)

---

Top Contributors

[![sicaboy](https://avatars.githubusercontent.com/u/2426114?v=4)](https://github.com/sicaboy "sicaboy (5 commits)")

---

Tags

laravelsicaboyip2country-laravel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sicaboy-ip2country-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/sicaboy-ip2country-laravel/health.svg)](https://phpackages.com/packages/sicaboy-ip2country-laravel)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)[xefi/faker-php-laravel

Faker php integration with laravel

1915.1k](/packages/xefi-faker-php-laravel)[dcblogdev/laravel-junie

Install pre-configured guides for Jetbrains Junie

392.5k](/packages/dcblogdev-laravel-junie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
