nckg / laravel-firewall by nckg

A small Laravel package to help you block IP addresses from accessing your application
563
4
2
Package Data
Maintainer Username: nckg
Maintainer Contact: nickgoris@gmail.com (Nick Goris)
Package Create Date: 2017-03-07
Package Last Update: 2021-06-08
Language: PHP
License: MIT
Last Refreshed: 2024-11-26 15:04:09
Package Statistics
Total Downloads: 563
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 4
Total Watchers: 2
Total Forks: 2
Total Open Issues: 0

HTML minifier

Build Status Packagist Packagist

Introduction

Very simple package to allow access to your Laravel application by IP.

Installation

You can install the package via composer:

composer require nckg/laravel-firewall

Add the FirewallServiceProvider to you config/app.php file.

// config/app.php
'providers' => [
    ...
    Nckg\Firewall\FirewallServiceProvider::class,
    ...
]

Publish the configuration file to your configuration path:

php artisan vendor:publish --provider="Nckg\Firewall\FirewallServiceProvider"

If you are using Laravel you can add the middleware to your middleware providers

// app/Http/Kernel.php
/**
 * The application's global HTTP middleware stack.
 *
 * @var array
 */
protected $middleware = [
    ...
    \Nckg\Firewall\Middleware\IpAccess::class,
];

Testing

composer test

License

The MIT License (MIT).