Download the PHP package jobmetric/laravel-ban-ips without Composer

On this page you can find all versions of the php package jobmetric/laravel-ban-ips. 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-ban-ips

Contributors Forks Stargazers MIT License LinkedIn

Ban Ip for laravel

This is an annoying IP management package for Laravel that you can use in your projects.

Install via composer

Run the following command to pull in the latest version:

Documentation

To use the services of this package, please follow the instructions below.

Migrate

After installing the package, you must migrate by running the following command:

Usage

To use the services of this package, you must use the BanIp class in your model.

Store Ban Ip

To store a ban ip, you can use the following code:

Note:

The ip field is required and must be a string.

The type field is required and must be one of the following values: hacker, spammer, bot, another.

The reason field is required and must be a string.

The banned_at field is required and must be a date.

The expire_at field is required and must be a date greater than the banned_at field.

Update Ban Ip

To update a ban ip, you can use the following code:

Note:

The type field is sometimes and must be one of the following values: hacker, spammer, bot, another.

The reason field is sometimes and must be a string.

The banned_at field is sometimes and must be a date.

The expire_at field is sometimes and must be a date greater than the banned_at field.

Delete Ban Ip

To delete a ban ip, you can use the following code:

Delete Expired Ban Ip

To delete expired ban ip, you can use the following code:

Helper Functions

This package contains several helper functions that you can use as follows:

Rules

There are some rules for using this package:

Ban Type

There can be various reasons for the IP ban:

Commands

This package contains several commands that you can use as follows

Command Description
ban-ip:remove Remove ban ip expire time. (This command is executed every minute in your Laravel)

Events

This package contains several events for which you can write a listener as follows

Event Description
BanIpStoredEvent This event is called after storing the ban ip.
BanIpUpdateEvent This event is called after updating the ban ip.
BanIpDeleteEvent This event is called after delete the ban ip.

Contributing

Thank you for considering contributing to the Laravel Ban Ip! The contribution guide can be found in the CONTRIBUTING.md.

License

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


All versions of laravel-ban-ips with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.1
laravel/framework Version >=9.19
jobmetric/laravel-package-core Version ^1.7
spatie/laravel-query-builder Version ^5.7
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 jobmetric/laravel-ban-ips contains the following files

Loading the files please wait ....