1. Go to this page and download the library: Download vitisstudio/restdb 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/ */
use Spatie\GuzzleRateLimiterMiddleware\RateLimiterMiddleware;
final class CrmRateLimit
{
public function __invoke(callable $handler): callable
{
// Default store is in-memory (per process). For a limit shared across
// web requests and queue workers, pass a Store backed by your cache.
return RateLimiterMiddleware::perSecond(10)($handler);
}
}
use Kevinrob\GuzzleCache\CacheMiddleware;
use Kevinrob\GuzzleCache\Storage\LaravelCacheStorage;
use Kevinrob\GuzzleCache\Strategy\GreedyCacheStrategy;
final class CrmCache
{
public function __invoke(callable $handler): callable
{
return (new CacheMiddleware(
new GreedyCacheStrategy(
new LaravelCacheStorage(cache()->store()),
300, // seconds
),
))($handler);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.