PHPackages                             dimsav/laravel-ip-service - 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. dimsav/laravel-ip-service

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

dimsav/laravel-ip-service
=========================

A Laravel package to get the client's country using the ip. A wrapper for http://ip2nation.com

v1(11y ago)1195014[2 issues](https://github.com/dimsav/laravel-ip-service/issues)MITPHPPHP &gt;=5.4.0CI failing

Since Dec 29Pushed 6y ago6 watchersCompare

[ Source](https://github.com/dimsav/laravel-ip-service)[ Packagist](https://packagist.org/packages/dimsav/laravel-ip-service)[ RSS](/packages/dimsav-laravel-ip-service/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

Laravel IP Service
==================

[](#laravel-ip-service)

Tries to guess the country code of the client, using his IP.

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

[](#installation)

[Download](http://ip2nation.com/ip2nation/Download) and import the ip database from [ip2nation.com](http://ip2nation.com/)

Usage
-----

[](#usage)

```
$service = App::make('Dimsav\IpService\IpService');

// country code for the given ip address

echo $service->getCountryCodeFromIp('123.123.123.123');

// country code for the client's ip address

echo $service->getCountryCodeFromClientIp();
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

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

Every ~0 days

Total

2

Last Release

4153d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba217ec530cda9762eb1b58c8f74d358c021dfe51755c1f846dc1375282080ce?d=identicon)[dimsav](/maintainers/dimsav)

---

Top Contributors

[![dimsav](https://avatars.githubusercontent.com/u/1785686?v=4)](https://github.com/dimsav "dimsav (10 commits)")

---

Tags

laravelIPcountrynation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dimsav-laravel-ip-service/health.svg)

```
[![Health](https://phpackages.com/badges/dimsav-laravel-ip-service/health.svg)](https://phpackages.com/packages/dimsav-laravel-ip-service)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1681.7M](/packages/dougsisk-laravel-country-state)[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8230.8k](/packages/dipeshsukhia-laravel-country-state-city-data)[stidges/laravel-country-flags

A Laravel wrapper for the stidges/country-flags package

28134.6k](/packages/stidges-laravel-country-flags)[hibit-dev/geodetect

Automatically detect user's geo data based on their IP address

2319.5k](/packages/hibit-dev-geodetect)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

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

PHPackages © 2026

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