PHP code example of oltrematica / laravel-ratelimiter

1. Go to this page and download the library: Download oltrematica/laravel-ratelimiter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

oltrematica / laravel-ratelimiter example snippets


Route::middleware(['throttle:api'])->group(function () {
// API routes go here
});

Route::post('/login', 'LoginController@login')->middleware('throttle:login');

Route::post('/register', 'RegisterController@register')->middleware('throttle:register');
bash
php artisan vendor:publish --provider="Oltrematica\RateLimiter\RateLimiterServiceProvider" --tag="ratelimiter-config"
shell
composer analyse