PHP code example of hedii / laravel-throttle-route

1. Go to this page and download the library: Download hedii/laravel-throttle-route 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/ */

    

hedii / laravel-throttle-route example snippets


Route::get('/first', 'FirstController@show')
    ->middleware(\Hedii\LaravelThrottleRoute\ThrottleRequests::class . ':20,1')
    ->name('first');
    
Route::get('/second', 'SecondController@show')
    ->middleware(\Hedii\LaravelThrottleRoute\ThrottleRequests::class . ':60,1')
    ->name('second');