This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
return new class extends Migration | |
{ | |
/** | |
* Run the migrations. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Saloon\RateLimitPlugin\Limit; | |
use Saloon\Http\Response; | |
Limit::custom(function (Response $response, Limit $limit) { | |
$hasExceededLimit = (int)$response->header('x-ratelimit-remaining-requests') === 0; | |
if ($hasExceededLimit === true) { | |
$limit->exceeded($releaseInSeconds); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Lazy Man's Saloon Fake | |
* | |
* This will record every request that you make in your application and store it in a folder | |
* based on the name of the test. This is incredibly powerful, but I wouldn't recommend it | |
* for every request if you are doing the same things over as it will waste API calls. | |
* | |
* @return void | |
*/ | |
function lazyFakeSaloon(): void |
OlderNewer