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

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

mostafaabdelbaset/laravel-ip-service
====================================

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

2.0(5y ago)011MITPHPPHP &gt;=7.2

Since Dec 29Pushed 5y agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (4)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

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 83.3% 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 ~1097 days

Total

3

Last Release

1960d ago

Major Versions

v0.1 → v1.02014-12-29

v1.0 → 2.02020-12-30

PHP version history (2 changes)v0.1PHP &gt;=5.4.0

2.0PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8994754?v=4)[Mostafa Abdel Baset](/maintainers/mostafaabdelbaset)[@mostafaabdelbaset](https://github.com/mostafaabdelbaset)

---

Top Contributors

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

---

Tags

laravelIPcountrynation

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/mostafaabdelbaset-laravel-ip-service/health.svg)](https://phpackages.com/packages/mostafaabdelbaset-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)
