PHPackages                             hayrican/ipchecker - 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. hayrican/ipchecker

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

hayrican/ipchecker
==================

Laravel package for providing restricted access by IP Address to your application

v1.3.0(6y ago)278071MITPHP

Since Nov 29Pushed 6y ago3 watchersCompare

[ Source](https://github.com/HayriCan/laravel-ip-checker)[ Packagist](https://packagist.org/packages/hayrican/ipchecker)[ Docs](https://github.com/HayriCan/laravel-ip-checker)[ RSS](/packages/hayrican-ipchecker/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Laravel IP Checker
==================

[](#laravel-ip-checker)

[![Latest Stable Version](https://camo.githubusercontent.com/f9ab096209eedbf11ab81dfb4af1c2f37a3db49ae965b9d3a7e1fb7a82eafb5f/68747470733a2f2f706f7365722e707567782e6f72672f686179726963616e2f6970636865636b65722f76657273696f6e)](https://packagist.org/packages/hayrican/ipchecker)[![Total Downloads](https://camo.githubusercontent.com/e559f7f52864a12d43f561c5197d4b7accaca2ab8564c3b4b1aed7fc3126bcf8/68747470733a2f2f706f7365722e707567782e6f72672f686179726963616e2f6970636865636b65722f646f776e6c6f616473)](https://packagist.org/packages/hayrican/ipchecker)[![Latest Unstable Version](https://camo.githubusercontent.com/8e3b0239ce0c13cc07b9392c5feccca8cb1e2c660d2b2cb5621972c8b986f611/68747470733a2f2f706f7365722e707567782e6f72672f686179726963616e2f6970636865636b65722f762f756e737461626c65)](//packagist.org/packages/hayrican/ipchecker)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/60406cca96c8ca98b4e9552223b5bd9bbe2119236f1278f77ce793f386db8351/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486179726943616e2f6c61726176656c2d69702d636865636b65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/HayriCan/laravel-ip-checker/?branch=master)[![Codacy Badge](https://camo.githubusercontent.com/3c500bc55a9eaa412b19833b1982d476cc6b61f2c3e96ccba91fc4e4f523089c/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3164316561653836646336353439373238653663653562376630363630663439)](https://www.codacy.com/manual/HayriCan/laravel-ip-checker?utm_source=github.com&utm_medium=referral&utm_content=HayriCan/laravel-ip-checker&utm_campaign=Badge_Grade)[![Build Status](https://camo.githubusercontent.com/6d43efed2f450117b098d22242018d3d31d7a4ac14d7dae101d2276a885afd7f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486179726943616e2f6c61726176656c2d69702d636865636b65722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/HayriCan/laravel-ip-checker/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/0f9fe26b650717fbf07b3f703281159f10ad729f276ba53073ddbc8587aedb24/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f486179726943616e2f6c61726176656c2d69702d636865636b65722f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![License](https://camo.githubusercontent.com/2108057cc5cbe4cde608d0b8c4e48b44e275b82bdba8f90f45a220013070e438/68747470733a2f2f706f7365722e707567782e6f72672f686179726963616e2f6970636865636b65722f6c6963656e7365)](https://packagist.org/packages/hayrican/ipchecker)

This package provides restricted access via IP Address to your application.

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

[](#installation)

To get started, you should add the `hayrican/ipchecker` Composer dependency to your project:

```
composer require hayrican/ipchecker

```

#### Service Provider (Laravel Older 5.5)

[](#service-provider-laravel-older-55)

##### If you are using later version of Laravel 5.5, you can skip this step.

[](#if-you-are-using-later-version-of-laravel-55-you-can-skip-this-step)

Register provider on your `config/app.php` file.

```
'providers' => [
    ...,
    HayriCan\IpChecker\IpCheckerServiceProvider::class,
]
```

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

[](#configuration)

You should publish vendor for configuration file.

```
$ php artisan vendor:publish --tag="ipchecker"
```

##### Driver

[](#driver)

The config file is called *ipchecker.php*. Currently supported drivers are `db` and `file`

Default driver is `file` and ipchecker will use file to record ip addresses. But if you want to use Database for records, migrate table by using

```
php artisan migrate
```

You have to change driver to `db` before migrate. Otherwise it will not migrate the table.

##### Route Group Middleware

[](#route-group-middleware)

```
'api_middleware'=>'api',
'web_middleware'=>'web',
```

If your routes has different middleware then these default values you can change them in here. These route middleware need for filtering response of denial access.

Localization
------------

[](#localization)

When you call `php artisan vendor:publish --tag="ipchecker"` command, it will also publish `lang` file to your `resources/lang` directory. You can change all fields as you desire.

Package Usage
=============

[](#package-usage)

1.Add Middleware
----------------

[](#1add-middleware)

Add middleware named `ipchecker` to the route or controller you want to log data

```
// in app.php or web.php

Route::group(['middleware' => ['ipchecker']], function () {
    Route::get('test',function (){
        dd('Test API');
    });
});
```

When try to access this route it will check your IP Address. If you ip address is not on the list you will get response

```
{
    "success": false,
    "code": 250,
    "message": "Your IP Address not in the list."
}
```

Otherwise you will access to the route.

2.Add IP Address
----------------

[](#2add-ip-address)

Up to default config dashboard can be accessible via ***yourdomain.com/iplists*** but it is configurable from config file `ipchecker.php`

```
{
"settings"=>[
    "auth"       => false,
    "admin_id"=>[],
    "route_prefix"=> "",
    ],
}
```

If you want to guard this page just change `"auth"` to `true` and it require `"auth"` middleware.

When you enabled auth you could add admin users id to `"admin_id"` array. If leave `"admin_id"` array empty, all users can has access to IP Checker dashboard

```
{
"settings"=>[
   "auth"=> true,
   "admin_id"=>[2,5],
   "route_prefix"=> "",
   ],
}
```

Also you can change the route prefix of this dashboard. If you change `"route_prefix"` to `"foo"` your dashboard will be accessible via ***yourdomain.com/foo/iplists***.

[![Screencast1](doc/iplist.PNG)](doc/iplist.PNG)

You can add IP Address in here.

Author
------

[](#author)

[Hayri Can BARÇIN](https://www.linkedin.com/in/hayricanbarcin/)
Email: [Contact Me](mailto:hayricanbarcin@gmail.com)

License
-------

[](#license)

This project is licensed under the MIT License - see the [License File](LICENSE) for details

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community9

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 ~1 days

Total

3

Last Release

2360d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/366774383f37676b6212de464ee0d1d4781a6395662c6555e9b8c26aef664db6?d=identicon)[hayrican](/maintainers/hayrican)

---

Top Contributors

[![HayriCan](https://avatars.githubusercontent.com/u/17090831?v=4)](https://github.com/HayriCan "HayriCan (16 commits)")

---

Tags

laravelhelperaccessPHP7ip-addressrestricted

### Embed Badge

![Health badge](/badges/hayrican-ipchecker/health.svg)

```
[![Health](https://phpackages.com/badges/hayrican-ipchecker/health.svg)](https://phpackages.com/packages/hayrican-ipchecker)
```

###  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)[cartalyst/support

Support helpers.

762.8M14](/packages/cartalyst-support)

PHPackages © 2026

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