Download the PHP package fill84/laravel-firewall without Composer

On this page you can find all versions of the php package fill84/laravel-firewall. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-firewall

Laravel Firewall Package

A comprehensive firewall middleware for Laravel applications that monitors and blocks suspicious activity, protecting your application from malicious requests and automated attacks.

Features

Installation

Install the package via Composer:

Laravel 11+ (Auto-Discovery)

The package will automatically register itself via Laravel's package auto-discovery feature.

Laravel 10 or Manual Registration

Add the service provider to your config/app.php:

Configuration

Publish the configuration file:

This will create a config/firewall.php file where you can customize the package settings:

Database Setup

Publish and run the migrations:

This will create two tables:

Usage

1. Register the Middleware

Add the firewall middleware to your application. You can do this globally or on specific routes.

Global Protection (Recommended)

Add to app/Http/Kernel.php:

Route-Specific Protection

Controller Protection

2. Admin Interface (Optional)

Publish the views to customize the admin interface:

The admin interface is built with Tailwind CSS for modern, responsive design. Make sure your Laravel application has Tailwind CSS configured.

Option 1: Manual Route Registration

Add routes to your routes/web.php:

Option 2: Publish Routes File

Alternatively, publish the routes file and load it automatically:

This creates routes/firewall-admin.php which will be automatically loaded by the package.

⚠️ Important: If you get a "Route not defined" error, make sure you have added the routes above to your application's routes/web.php file. You can also copy the example routes from vendor/fill84/laravel-firewall/routes/web.php.

Admin Interface Features:

Styling Requirements:

The admin interface requires Tailwind CSS. If your Laravel application doesn't have Tailwind CSS installed:

Add to your tailwind.config.js:

Configuration Options

Suspicious Paths

Define patterns that should be monitored:

Maximum Attempts

Set how many suspicious requests trigger a block:

IP Whitelisting

Protect trusted IPs from being blocked:

Detailed Logging

Control what information is logged:

Environment Variables

You can also configure the package using environment variables:

Manual IP Management

Block an IP Programmatically

Unblock an IP Programmatically

Database Maintenance

Clean Up Old Logs

Monitor Database Size

The firewall logs can grow large over time. Consider:

Performance Considerations

Security Notes

Troubleshooting

Common Issues

  1. Route [admin.firewall.logs.detail] not defined

    • Solution: Make sure you have added all the admin routes to your routes/web.php file
    • Copy the routes from the installation section above or from vendor/fill84/laravel-firewall/routes/web.php
  2. Middleware not working: Ensure it's properly registered in Kernel.php
  3. Database errors: Run migrations with php artisan migrate
  4. High false positives: Adjust suspicious_paths configuration
  5. Performance issues: Clean up old logs and optimize database
  6. Tailwind CSS not working: Ensure Tailwind is properly installed and configured

Debug Mode

Enable detailed logging in your configuration:

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This package is open-sourced software licensed under the MIT license.

Support

If you encounter any issues or have questions, please create an issue on GitHub.


Note: Replace fill84/laravel-firewall and Fill84 with your actual package name and namespace if you fork this project.


All versions of laravel-firewall with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fill84/laravel-firewall contains the following files

Loading the files please wait ...