Skip to content

best012/ddos

Repository files navigation

To generate installation instructions and a README for your Laravel package, you should include important information, such as installation steps, configuration details, and basic usage. Here's a template for a simple README file:

DDoS Protection Package for Laravel

The DDoS Protection package provides a robust solution to defend your Laravel applications against Distributed Denial of Service (DDoS) attacks.

Installation

To install the package, you can use Composer. Run the following command in your Laravel project:

composer require eckmar/ddos-protection

Configuration

After installing the package, Laravel will automatically discover and register the service provider. However, you may need to publish the configuration and views. Run the following command:

php artisan vendor:publish --provider="Eckmar\DDoSProtection\DDoSPackageServiceProvider"

This command will copy the configuration file and views to your project, allowing you to customize them as needed.

Middleware

The package includes a middleware named DDoSCheck for protecting routes from DDoS attacks. To use it, add the middleware to your routes:

use Eckmar\DDoSProtection\Middleware\DDoSCheck;

Route::post('/ddos_check', function () {
    // Your route logic here
})->middleware(DDoSCheck::class);

CAPTCHA Validation

The middleware includes CAPTCHA validation. Ensure you have the necessary routes and views set up. The package provides a default view for the CAPTCHA form.

Usage

After installation and configuration, your Laravel application is protected against DDoS attacks, and you can utilize the middleware to secure specific routes.

Feel free to customize the package as needed for your project.

Credits

  • Author: Eckmar

License

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


Feel free to adjust the content based on your package's specific features and requirements. Include any additional information that users might find helpful.

You can still use the php artisan vendor:publish command to publish configuration files and views. The user can selectively publish your package's assets if needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published