| Package Data | |
|---|---|
| Maintainer Username: | overflowsith |
| Maintainer Contact: | gabriele.stefanini@gmail.com (Gabriele Stefanini) |
| Package Create Date: | 2015-02-03 |
| Package Last Update: | 2015-02-09 |
| Language: | PHP |
| License: | Unknown |
| Last Refreshed: | 2025-10-30 03:06:34 |
| Package Statistics | |
|---|---|
| Total Downloads: | 104 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 3 |
| Total Watchers: | 1 |
| Total Forks: | 1 |
| Total Open Issues: | 0 |
Add the package to your composer.json file and run composer update:
{
"require": {
"overflowsith/firewall": "dev-master"
}
}
Add Overflowsith\Firewall\FirewallServiceProvider to your app/config/app.php file, inside the providers array.
Publish the package's config with php artisan config:publish overflowsith/firewall, so you can easily modify it in: app/config/packages/overflowsith/firewall/config.php
This firewall package can be use in the App::before filter
App::before(function($request)
{
if (Firewall::isNotAllowed($request->ip())) {
return Firewall::renderAccessDenied();
}
});
You can set an array of IP addresses with or without wildcards, for example
'127.0.0.1',
'192.168.*',