Download the PHP package michaelnabil230/laravel-block-ip without Composer

On this page you can find all versions of the php package michaelnabil230/laravel-block-ip. 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-block-ip

Laravel Block IP Package

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

The Laravel Block IP package provides a convenient way to control everything related to website visits using the Laravel framework. It allows you to block specific IP addresses, configure rate limiting, and receive notifications for certain events.

Installation

You can install the package via Composer by running the following command:

After installing the package, you need to publish the package files and run the migrations:

To publish and run the migrations separately, you can use the following commands:

You can also publish the package's configuration file using the following command:

The published configuration file allows you to customize various settings related to block IP functionality, notifications, caching, and more.

Usage

To configure rate limiting and use the package's functionality, you can add code to your app/Providers/RouteServiceProvider.php file. The following code demonstrates how to configure rate limiting and enable the package:

By default, the rate limiter is set to allow 60 requests per minute, but you can customize this value by passing it to the rateLimiter() method.

The package provides a BlockIpMiddleware middleware that you can add to your routes in the app/Http/Kernel.php file. Make sure to uncomment the necessary line for the throttle middleware as well. Here's an example:

To protect your routes using the block IP middleware and rate limiting, you can define them as follows:

If you want to unblock all IP addresses, you can use the following command:

You can also unblock multiple IP addresses by providing them as a comma-separated list:

To block new IP addresses, you can use the following command:

Support

If you find this package useful, you can show your support by contributing financially:

Testing

You can run the package's tests using the following command:

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-block-ip with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
spatie/laravel-package-tools Version ^1.15.0
illuminate/contracts Version ^10.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 michaelnabil230/laravel-block-ip contains the following files

Loading the files please wait ....