PHP code example of jonathanstaniforth / laravel-with-limits

1. Go to this page and download the library: Download jonathanstaniforth/laravel-with-limits 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/ */

    

jonathanstaniforth / laravel-with-limits example snippets

 php
$request = new LaravelWithLimits\Request();

$response = $request->method('GET')
    ->path('static-data/v3/champions')
    ->withParameters(['locale' => 'en_GB', 'tags' => 'all'])
    ->withLimit(function ($rate_limit) {
        $rate_limit->api('riot')
            ->endpoint('static-data/v3/champions')
            ->header('X-Method-Rate-Limit');
    })->send();