Download the PHP package oltrematica/laravel-ratelimiter without Composer

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

GitHub Tests Action Status GitHub PhpStan Action Status Latest Version on Packagist Total Downloads

Oltrematica API Rate Limiter

A Laravel package to manage rate limiters for APIs, used internally at Oltrematica for our projects.

Introduction

This package provides a simple configuration for rate limiters in APIs, allowing easy management of requests for login, registration, and general API routes. It is designed to be straightforward to integrate and configure within Laravel projects.

Installation

To install the package, run the following command in your terminal:

Configuration

The package includes a configuration file that can be customized. To publish the configuration file to your project, run the following command:

This will publish the rate-limiter.php configuration file into your project's config directory.

Usage

To apply rate limiters, use the following middleware in your routes:

Examples

Applying Rate Limiting to API Routes

In routes/api.php:

Applying Rate Limiting to Login Route

In routes/web.php:

Applying Rate Limiting to Registration Route

In routes/web.php:

Configuration Options

The rate-limiter.php configuration file allows you to customize request limits for each type of rate limiter. You can override default values using environment variables in your .env file.

Example .env Variables

Code Quality

The project includes automated tests and tools for code quality control.

Rector

Rector is a tool for automating code refactoring and migrations. It can be run using the following command:

PhpStan

PhpStan is a tool for static analysis of PHP code. It can be run using the following command:

Pint

Pint is a tool for formatting PHP code. It can be run using the following command:

Automated Tests

The project includes automated tests and tools for code quality control.

Contributing

Feel free to contribute to this package by submitting issues or pull requests. We welcome any improvements or bug fixes you may have.


All versions of laravel-ratelimiter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts 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 oltrematica/laravel-ratelimiter contains the following files

Loading the files please wait ....