Skip to content

Instantly share code, notes, and snippets.

View jeffreyvanhees's full-sized avatar

Jeffrey van Hees jeffreyvanhees

View GitHub Profile
@iksaku
iksaku / Pretender.php
Last active July 23, 2022 13:59
Pretender Middleware for Laravel apps that rely heavily on JS frameworks
<?php
namespace App\Http\Middleware;
use Cache;
use Closure;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\RequestOptions;
use Illuminate\Http\Request;