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 |
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
<?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 Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class AddMissingHaystackColumnsFromVersionZeroDotEight 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 | |
namespace App\Data; | |
class Paginator | |
{ | |
/** | |
* Constructor | |
* | |
* @param int $totalPages |
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 | |
/** | |
* Record a request and respond with a fixture. | |
* | |
* @throws \Sammyjo20\Saloon\Exceptions\SaloonInvalidMockResponseCaptureMethodException | |
* @throws ReflectionException | |
* @throws \GuzzleHttp\Exception\GuzzleException | |
* @throws \Sammyjo20\Saloon\Exceptions\SaloonException | |
* @throws JsonException |
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
killall -KILL node |
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
const router = new VueRouter({ | |
routes: routes, | |
scrollBehavior (to, from, savedPosition) { | |
return { x: 0, y: 0 } | |
} | |
}); |
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
gpg -c --no-synkey-cache --cipher-algo AES256 file-name.sql |
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 | |
namespace App\Casts; | |
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | |
class EncryptedJson implements CastsAttributes | |
{ | |
/** | |
* Cast the given value. |
NewerOlder