This package is abandoned and no longer maintained. No replacement package was suggested.

Accessible IPs for Laravel.

1.0.2 2017-06-20 03:57 UTC

This package is auto-updated.

Last update: 2021-02-15 16:37:57 UTC


Build Status Total Downloads Latest Stable Version License License

Accessible IPs for Laravel. Supported allowed ip and proxy server.


laravel 5.1 - 5.4.


Install via composer

$ composer require yish/laravel-accessible-ip

You need to register service provider in config/app.php, also, you can binding AppServiceProvider on register.

Notice You must register provider after Illuminate\Http\Request.

    'providers' => [
     * Package Service Providers...

Next, navigate to app/Http/Middleware/Kernel.php, adding middleware

protected $routeMiddleware = [
        'access-ip' => \Mombuyish\AccessibleIP\Middleware\AccessibleIPAddress::class,

Finally, publish the config.

$ php artisan vendor:publish --provider="Mombuyish\AccessibleIP\AccessibleIPServiceProvider"

You can configrate on config access-ip.php

🎉🎉 Supported CI/DR !! 🎉🎉

Including inside, so you don't need add it.

'allowed' => [

If you have proxies server on front, you should be place proxies:

🎉🎉 Supported CI/DR !! 🎉🎉

'proxies' => [

You can use on routing middleware, for example:

Route::get('/', function () {
    return view('welcome');

or you can do this:

Route::group(['middleware' => ['access-ip']], function() {
    Route::get('/', function () {
        return view('welcome');


When you denied by middleware, you will get 403 Forbidden. You can use app/Exceptions/Handler.php to change exception do something.

It will get same things.