PHPackages                             abdulhadii777/laravel-ip-guard - 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. [Security](/categories/security)
4. /
5. abdulhadii777/laravel-ip-guard

ActiveLibrary[Security](/categories/security)

abdulhadii777/laravel-ip-guard
==============================

Middleware to restrict application usage from blacklisted IPs with whitelist overrides.

v0.1.1(7mo ago)01MITPHPPHP ^8.4

Since Sep 16Pushed 7mo agoCompare

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

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

Laravel IP Guard
================

[](#laravel-ip-guard)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dda88150648ec8a334fffe107b1947f03c52ad67e8a8f373a278e737c68c7e52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616264756c68616469693737372f6c61726176656c2d69702d67756172642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/abdulhadii777/laravel-ip-guard)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1ca2c624e6971eab32f5dd30736d95a3ddc6f4e982a96bc3651d4ab652a630c1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616264756c68616469693737372f6c61726176656c2d69702d67756172642f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/abdulhadii777/laravel-ip-guard/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/1a0660a8fdbafecbaa514c569000494a9e97368444521cac471cc0ee1947d14e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616264756c68616469693737372f6c61726176656c2d69702d67756172642f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/abdulhadii777/laravel-ip-guard/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/283f4b83b80bd4eddc81e5bb1206e803892bbb721ec3bb4783008d5f09d3fa59/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616264756c68616469693737372f6c61726176656c2d69702d67756172642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/abdulhadii777/laravel-ip-guard)

A powerful Laravel middleware package for IP-based access control with whitelist and blacklist support. Protect your application by allowing or blocking specific IP addresses with dynamic database management and a flexible priority system.

**Current Version:** v0.1.1

Features
--------

[](#features)

- **Dynamic Database Management**: Add/remove IPs without code changes
- **Priority-Based Access Control**: Blacklist takes highest priority over whitelist
- **Environment Toggle**: Enable/disable IP restrictions via environment variable
- **Whitelist Support**: Allow only specific IPs
- **Blacklist Support**: Block specific IPs (including `*` for all IPs)
- **Exact IP Matching**: Support for exact IP addresses only
- **Soft Toggle Control**: Enable/disable IPs without deleting records
- **Artisan Commands**: Full CLI management interface
- **Facade Support**: Easy programmatic access
- **Proxy Support**: Works behind load balancers and proxies
- **Fallback Support**: Falls back to config if database unavailable
- **Custom Error Responses**: JSON or plain text error responses
- **Laravel Integration**: Seamless integration with Laravel middleware

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/f75a1fb2928926d7f88ae968fd908ee07c80d278877eb3e969f3b3f463b1e95e/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f6c61726176656c2d69702d67756172642e6a70673f743d31)](https://spatie.be/github-ad-click/laravel-ip-guard)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

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

[](#installation)

You can install the package via composer:

```
composer require abdulhadii777/laravel-ip-guard
```

The package will automatically register itself. You can publish the config file and migration with:

```
php artisan vendor:publish --provider="Ahs\LaravelIpGuard\LaravelIpGuardServiceProvider" --tag="config"
php artisan vendor:publish --provider="Ahs\LaravelIpGuard\LaravelIpGuardServiceProvider" --tag="migrations"
```

Or use the package's publish commands:

```
php artisan vendor:publish --tag="ip-guard-config"
php artisan vendor:publish --tag="ip-guard-migrations"
```

Then run the migration:

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

After publishing the config file, you can configure the package in `config/ip-guard.php`. The package now uses **database-driven IP management** by default, with config as fallback:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Enable/Disable IP Guard
    |--------------------------------------------------------------------------
    | Set to false to disable IP restrictions entirely.
    | You can also use IP_GUARD_ENABLED environment variable.
    */

    'enabled' => env('IP_GUARD_ENABLED', true),

    /*
    |--------------------------------------------------------------------------
    | IP Lists (Fallback Configuration)
    |--------------------------------------------------------------------------
    | These are used as fallback when database is unavailable.
    | Use '*' to match all IPs. Supports exact IPs only.
    |
    | Priority order:
    | 1. Blacklist (highest priority) - if IP matches, block access
    |    - '*' in blacklist blocks ALL IPs regardless of whitelist
    | 2. Whitelist - if IP matches, allow access (only if not blacklisted)
    | 3. null/empty - no restrictions (only if not blacklisted)
    |
    | Example: blacklist=['*'] + whitelist=['1.2.3.4'] = NO ACCESS (all blocked)
    */

    'whitelist' => null,   // Fallback whitelist (use database for dynamic management)
    'blacklist' => null,   // Fallback blacklist (use database for dynamic management)

    /*
    |--------------------------------------------------------------------------
    | Client IP Resolution
    |--------------------------------------------------------------------------
    | Set the header to use for client IP when behind a proxy/load balancer.
    | Set to null to use Laravel's default IP detection.
    */

    'ip_header' => 'X-Forwarded-For', // or 'X-Real-IP', 'CF-Connecting-IP', etc.

    /*
    |--------------------------------------------------------------------------
    | Error Response
    |--------------------------------------------------------------------------
    | Configure the response when access is denied.
    */

    'error' => [
        'status'  => 403,
        'message' => 'Access denied from your IP address.',
        'json'    => true, // Return JSON response if true, plain text if false
    ],
];
```

Database Management
-------------------

[](#database-management)

The package now uses **database-driven IP management** by default. IPs are stored in the `ip_guards` table with the following structure:

- `id`: Primary key
- `ip_address`: The IP address (exact match only)
- `type`: Either 'whitelist' or 'blacklist'
- `description`: Optional description for the IP
- `is_active`: Boolean flag to enable/disable the IP
- `created_at` / `updated_at`: Timestamps

### Database Schema

[](#database-schema)

```
CREATE TABLE ip_guards (
    id BIGINT PRIMARY KEY AUTO_INCREMENT,
    ip_address VARCHAR(255) NOT NULL,
    type ENUM('whitelist', 'blacklist') NOT NULL,
    description TEXT NULL,
    is_active BOOLEAN DEFAULT TRUE,
    created_at TIMESTAMP NULL,
    updated_at TIMESTAMP NULL,
    INDEX idx_ip_type (ip_address, type),
    INDEX idx_type_active (type, is_active),
    UNIQUE KEY unique_ip_type (ip_address, type)
);
```

Usage
-----

[](#usage)

### Dynamic IP Management

[](#dynamic-ip-management)

#### Via Facade

[](#via-facade)

```
use Ahs\LaravelIpGuard\Facades\LaravelIpGuard;

// Add IPs to whitelist
LaravelIpGuard::addToWhitelist('192.168.1.100', 'Office IP');
LaravelIpGuard::addToWhitelist('203.0.113.10', 'Admin IP');

// Add IPs to blacklist
LaravelIpGuard::addToBlacklist('10.0.0.50', 'Blocked IP');
LaravelIpGuard::addToBlacklist('*', 'Block all IPs');

// Check IP status
$isWhitelisted = LaravelIpGuard::isWhitelisted('192.168.1.100');
$isBlacklisted = LaravelIpGuard::isBlacklisted('10.0.0.50');

// Get IP lists
$whitelistIps = LaravelIpGuard::getWhitelistIps();
$blacklistIps = LaravelIpGuard::getBlacklistIps();

// Remove IPs
LaravelIpGuard::removeFromWhitelist('192.168.1.100');
LaravelIpGuard::removeFromBlacklist('10.0.0.50');

// Bulk operations
$ips = ['192.168.1.101', '192.168.1.102', '192.168.1.103'];
LaravelIpGuard::bulkAddToWhitelist($ips, 'Office Network');

// Get statistics
$stats = LaravelIpGuard::getStats();
// Returns: ['whitelist_count' => 5, 'blacklist_count' => 2, 'total_count' => 7]
```

#### Via Artisan Commands

[](#via-artisan-commands)

```
# Add IPs
php artisan ip-guard:manage add whitelist 192.168.1.100 --description="Office IP"
php artisan ip-guard:manage add blacklist 10.0.0.50 --description="Blocked IP"

# List IPs
php artisan ip-guard:manage list                    # List all IPs
php artisan ip-guard:manage list whitelist          # List whitelist only
php artisan ip-guard:manage list blacklist          # List blacklist only

# Remove IPs
php artisan ip-guard:manage remove whitelist 192.168.1.100
php artisan ip-guard:manage remove blacklist 10.0.0.50

# Toggle IP status (enable/disable without deleting)
php artisan ip-guard:manage toggle --id=1

# Clear IPs
php artisan ip-guard:manage clear whitelist         # Clear all whitelist IPs
php artisan ip-guard:manage clear blacklist         # Clear all blacklist IPs
php artisan ip-guard:manage clear                   # Clear all IPs

# Show statistics
php artisan ip-guard:manage stats
```

#### Via Model

[](#via-model)

```
use Ahs\LaravelIpGuard\Models\IpGuard;

// Direct model usage
IpGuard::addToWhitelist('192.168.1.100', 'Office IP');
IpGuard::addToBlacklist('10.0.0.50', 'Blocked IP');

// Query IPs
$whitelistIps = IpGuard::whitelist()->active()->get();
$blacklistIps = IpGuard::blacklist()->active()->get();

// Toggle IP status
$ip = IpGuard::find(1);
$ip->toggleActive(); // Toggle between active/inactive

// Check if IP is in list
$isWhitelisted = IpGuard::isWhitelisted('192.168.1.100');
$isBlacklisted = IpGuard::isBlacklisted('10.0.0.50');
```

### Basic Middleware Usage

[](#basic-middleware-usage)

Apply the middleware to routes in your `routes/web.php` or `routes/api.php`:

```
// Apply to specific routes
Route::get('/admin', function () {
    return view('admin');
})->middleware('ip.guard');

// Apply to route groups
Route::middleware(['ip.guard'])->group(function () {
    Route::get('/dashboard', 'DashboardController@index');
    Route::get('/profile', 'ProfileController@index');
});

// Apply to controllers
Route::get('/admin', 'AdminController@index')->middleware('ip.guard');
```

### Global Middleware

[](#global-middleware)

Add the middleware globally in `app/Http/Kernel.php`:

```
protected $middleware = [
    // ... other middleware
    \Ahs\LaravelIpGuard\Middleware\IpGuard::class,
];
```

### Controller Middleware

[](#controller-middleware)

Apply in your controller constructor:

```
class AdminController extends Controller
{
    public function __construct()
    {
        $this->middleware('ip.guard');
    }
}
```

IP Matching Rules
-----------------

[](#ip-matching-rules)

The package supports exact IP matching only:

### Exact IP Matching

[](#exact-ip-matching)

```
'whitelist' => ['203.0.113.10', '198.51.100.20']
```

### Block All IPs

[](#block-all-ips)

```
'blacklist' => ['*']  // Block all IPs (useful with whitelist)
```

Priority Rules
--------------

[](#priority-rules)

The middleware follows this priority order:

1. **Environment Check**: If `IP_GUARD_ENABLED=false`, all IPs are **allowed** (no restrictions)
2. **Blacklist Check** (Highest Priority): If the client IP matches any blacklist rule, access is **denied**
    - `*` in blacklist blocks **ALL IPs** regardless of whitelist
3. **Whitelist Check**: If whitelist is configured and IP matches, access is **allowed**
4. **Whitelist Enforcement**: If whitelist is configured but IP doesn't match, access is **denied**
5. **Default**: If whitelist is null/empty and IP is not blacklisted, access is **allowed**

### Examples:

[](#examples)

**Scenario 1: Blacklist with `*`**

```
'blacklist' => ['*'],
'whitelist' => ['1.2.3.4', '5.6.7.8']
// Result: NO ACCESS (all IPs blocked by blacklist)
```

**Scenario 2: Normal priority**

```
'blacklist' => ['192.168.1.100'],
'whitelist' => ['1.2.3.4', '5.6.7.8']
// Result: Only 1.2.3.4 and 5.6.7.8 allowed, 192.168.1.100 blocked, others blocked
```

**Scenario 3: No restrictions**

```
'blacklist' => null,
'whitelist' => null
// Result: ALL ACCESS (no restrictions)
```

**Scenario 4: Disabled**

```
IP_GUARD_ENABLED=false
// Result: ALL ACCESS (IP guard disabled)
```

Proxy and Load Balancer Support
-------------------------------

[](#proxy-and-load-balancer-support)

When your application is behind a proxy or load balancer, configure the `ip_header` option:

```
'ip_header' => 'X-Forwarded-For',  // Most common
// or
'ip_header' => 'X-Real-IP',        // Nginx
// or
'ip_header' => 'CF-Connecting-IP', // Cloudflare
```

Make sure your Laravel application trusts the proxy by configuring `TrustProxies` middleware.

Error Responses
---------------

[](#error-responses)

### JSON Response (default)

[](#json-response-default)

```
{
    "message": "Access denied from your IP address."
}
```

### Plain Text Response

[](#plain-text-response)

```
Access denied from your IP address.

```

Configure the response format in the config:

```
'error' => [
    'status'  => 403,
    'message' => 'Custom access denied message',
    'json'    => false, // Use plain text instead of JSON
],
```

Advanced Examples
-----------------

[](#advanced-examples)

### Admin Panel Protection

[](#admin-panel-protection)

```
// Via Artisan Commands
php artisan ip-guard:manage add whitelist 203.0.113.10 --description="Admin Office"
php artisan ip-guard:manage add whitelist 198.51.100.20 --description="Admin Home"
php artisan ip-guard:manage add blacklist "*" --description="Block all others"

// Via Facade
LaravelIpGuard::addToWhitelist('203.0.113.10', 'Admin Office');
LaravelIpGuard::addToWhitelist('198.51.100.20', 'Admin Home');
LaravelIpGuard::addToBlacklist('*', 'Block all others');
```

### Environment-Based Control

[](#environment-based-control)

```
# .env
IP_GUARD_ENABLED=true   # Enable IP restrictions
# IP_GUARD_ENABLED=false  # Disable IP restrictions entirely
```

### Mixed Blacklist and Whitelist

[](#mixed-blacklist-and-whitelist)

```
// Via Artisan Commands
php artisan ip-guard:manage add blacklist 192.168.1.100 --description="Problematic IP"
php artisan ip-guard:manage add blacklist 10.0.1.50 --description="Blocked IP"
php artisan ip-guard:manage add whitelist 203.0.113.10 --description="Trusted IP"
php artisan ip-guard:manage add whitelist 198.51.100.20 --description="Trusted IP"

// Via Facade
LaravelIpGuard::addToBlacklist('192.168.1.100', 'Problematic IP');
LaravelIpGuard::addToBlacklist('10.0.1.50', 'Blocked IP');
LaravelIpGuard::addToWhitelist('203.0.113.10', 'Trusted IP');
LaravelIpGuard::addToWhitelist('198.51.100.20', 'Trusted IP');
// Result: Only whitelisted IPs allowed, except blacklisted ones
```

### Block Specific IPs

[](#block-specific-ips)

```
// Via Artisan Commands
php artisan ip-guard:manage add blacklist 1.2.3.4 --description="Blocked IP"
php artisan ip-guard:manage add blacklist 5.6.7.8 --description="Blocked IP"

// Via Facade
LaravelIpGuard::addToBlacklist('1.2.3.4', 'Blocked IP');
LaravelIpGuard::addToBlacklist('5.6.7.8', 'Blocked IP');
```

### Development Environment

[](#development-environment)

```
// Via Artisan Commands
php artisan ip-guard:manage add whitelist 127.0.0.1 --description="Localhost"
php artisan ip-guard:manage add whitelist 192.168.1.100 --description="Dev IP"
php artisan ip-guard:manage add whitelist 10.0.0.50 --description="Local IP"

// Via Facade
LaravelIpGuard::addToWhitelist('127.0.0.1', 'Localhost');
LaravelIpGuard::addToWhitelist('192.168.1.100', 'Dev IP');
LaravelIpGuard::addToWhitelist('10.0.0.50', 'Local IP');
```

### Temporary IP Management

[](#temporary-ip-management)

```
// Temporarily disable an IP without deleting
$ip = IpGuard::find(1);
$ip->toggleActive(); // Disable
// Later...
$ip->toggleActive(); // Re-enable

// Or via command
php artisan ip-guard:manage toggle --id=1
```

Testing
-------

[](#testing)

The package includes comprehensive tests using Pest 4 with MySQL database testing.

### Prerequisites

[](#prerequisites)

1. **MySQL Database**: Ensure MySQL is running and accessible
2. **Test Database**: Create a test database (or run the setup script)

```
# Create test database
mysql -u root -p

```

Security Considerations
-----------------------

[](#security-considerations)

- Always test your IP rules in a staging environment
- Consider using both whitelist and blacklist for maximum security
- Regularly review and update your IP lists
- Monitor access logs for blocked attempts
- Use HTTPS to prevent IP spoofing

Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

1. **Middleware not working**: Ensure the middleware is properly registered and applied
2. **Wrong IP detected**: Check your `ip_header` configuration and proxy setup
3. **Blocked legitimate users**: Review your whitelist/blacklist rules and priority order
4. **IP guard not working**: Check if `IP_GUARD_ENABLED` is set to `true` in your environment
5. **All IPs blocked**: Check if `*` is in your blacklist (this blocks all IPs)
6. **Whitelist not working**: Remember blacklist takes priority - check if IP is blacklisted first
7. **Invalid IP format**: Ensure all IPs in your lists are valid IPv4 or IPv6 addresses
8. **Database connection issues**: Check if migration has been run and database is accessible
9. **IP not found in database**: Use `php artisan ip-guard:manage list` to check if IP exists
10. **Inactive IPs**: Check if IP is disabled using `php artisan ip-guard:manage toggle --id=X`

### Debug Mode

[](#debug-mode)

Enable Laravel's debug mode to see detailed error messages:

```
// config/app.php
'debug' => true,
```

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)

- [Abdul Hadi](https://github.com/ahs_777)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance62

Regular maintenance activity

Popularity1

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 59.9% 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

239d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3296c871fc0d742473a340c1186823e8b379e2c02fa26f3f94dfe8bf1be2faac?d=identicon)[abdulhadii777](/maintainers/abdulhadii777)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (376 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (46 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (28 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (23 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (19 commits)")[![pforret](https://avatars.githubusercontent.com/u/474312?v=4)](https://github.com/pforret "pforret (16 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (14 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (12 commits)")[![patinthehat](https://avatars.githubusercontent.com/u/5508707?v=4)](https://github.com/patinthehat "patinthehat (10 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (10 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (8 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (8 commits)")[![abdulhadii777](https://avatars.githubusercontent.com/u/102801061?v=4)](https://github.com/abdulhadii777 "abdulhadii777 (6 commits)")[![thecaliskan](https://avatars.githubusercontent.com/u/13554944?v=4)](https://github.com/thecaliskan "thecaliskan (5 commits)")[![irfanm96](https://avatars.githubusercontent.com/u/42065936?v=4)](https://github.com/irfanm96 "irfanm96 (5 commits)")[![IGedeon](https://avatars.githubusercontent.com/u/694313?v=4)](https://github.com/IGedeon "IGedeon (4 commits)")[![maartenpaauw](https://avatars.githubusercontent.com/u/4550875?v=4)](https://github.com/maartenpaauw "maartenpaauw (3 commits)")[![abenerd](https://avatars.githubusercontent.com/u/7523903?v=4)](https://github.com/abenerd "abenerd (3 commits)")[![jessarcher](https://avatars.githubusercontent.com/u/4977161?v=4)](https://github.com/jessarcher "jessarcher (3 commits)")[![koossaayy](https://avatars.githubusercontent.com/u/6431084?v=4)](https://github.com/koossaayy "koossaayy (3 commits)")

---

Tags

laravelahslaravel-ip-guard

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/abdulhadii777-laravel-ip-guard/health.svg)

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

###  Alternatives

[spatie/laravel-ciphersweet

Use ciphersweet in your Laravel project

416718.4k1](/packages/spatie-laravel-ciphersweet)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)

PHPackages © 2026

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