PHPackages                             michaelcrowcroft/laravel-cloud-ip - 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. michaelcrowcroft/laravel-cloud-ip

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

michaelcrowcroft/laravel-cloud-ip
=================================

Track the IP ranges in use by cloud providers and determine if IP addresses are associated with them. Compatable with both IPv4 and IPv6.

0.1.1(2y ago)19MITPHPPHP ^8.1

Since Oct 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/MichaelCrowcroft/laravel-cloud-ip)[ Packagist](https://packagist.org/packages/michaelcrowcroft/laravel-cloud-ip)[ RSS](/packages/michaelcrowcroft-laravel-cloud-ip/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

☁️ Track Cloud Provider IPs
===========================

[](#️-track-cloud-provider-ips)

Track IP ranges in use by cloud providers and determine if IP addresses are associated with them. Compatable with both IPv4 and IPv6.

**Cloud providers currently supported:**

- Amazon Web Services
- Google Cloud Platform

**Coming Soon:**

- Azure
- Cloudflare

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

[](#installation)

You can install the package via composer:

```
composer require michaelcrowcroft/laravel-cloud-ip
```

The package will automatically register itself.

While the package doesn't publish a migration file, you do need to run its migrations before using.

```
php artisan migrate
```

Now that you have migrated the `cloud_ip` table you can use the provided artisan command to populate the table with cloud provider's published IP ranges.

```
php artisan cloudip:get
```

Usage
-----

[](#usage)

Once the package is installed you can access information about the IP addresses cloud providers are using through `CloudIP` model. A list of th fields associated are below. This can be used like any other eloquent model.

A method is provided to select a record associated with an IP. We only select the first record, because one IP might be in multiple ranges that cloud providers use for difference services. Ultimately they will all come back to the same cloud provider though. This accepts an IP address as a long, hex, or in dot notation (as a string).

```
public function cloudIP()
{
    public static function HasIP($ip): self|null
    {
        $ip = IP::parse($ip);

        return CloudIP::where('first_ip', '=', $ip->toLong())
            ->first();
    }
}
```

This can be used as follows, returning the single CloudIP record that the IP is associated with if it is in fact associated with a cloud provider.

```
CloudIP::hasIP('3.2.34.0')->get();
```

Provided Fields
---------------

[](#provided-fields)

- **ip\_prefix:** A range of IPs in CIDR notation.
- **first\_ip:** The first IP in the range as a long.
- **last\_ip:** The last IP in the range as a long.
- **type:** Whether an IP range is IPv4 or IPv6.
- **provider:** The cloud provider the IP range is associated with.

Extra Tip
---------

[](#extra-tip)

Cloud providers don't often change their IP addresses in use, but it can be worth setting up provided artisan command to run weekly in the scheduler to make sure your Cloud IP data is up to date.

```
// In your app/Console/Kernel.php file
protected function schedule(Schedule $schedule): void
{
    $schedule->command('cloudip:get')->weekly();
}
```

License
-------

[](#license)

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

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

995d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11324235?v=4)[Michael Crowcroft](/maintainers/MichaelCrowcroft)[@MichaelCrowcroft](https://github.com/MichaelCrowcroft)

---

Top Contributors

[![MichaelCrowcroft](https://avatars.githubusercontent.com/u/11324235?v=4)](https://github.com/MichaelCrowcroft "MichaelCrowcroft (11 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/michaelcrowcroft-laravel-cloud-ip/health.svg)

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

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M987](/packages/statamic-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.9k69.5k](/packages/grumpydictator-firefly-iii)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)

PHPackages © 2026

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