Skip to content

Instantly share code, notes, and snippets.

View tegimus's full-sized avatar

Tegimus Infotech tegimus

View GitHub Profile
@tegimus
tegimus / VerifyCsrfToken.php
Created August 9, 2018 22:32
VerifyCsrfToken middleware for use with Lumen
<?php
namespace App\Http\Middleware;
use Closure;
use Symfony\Component\HttpFoundation\Cookie;
use Illuminate\Contracts\Encryption\Encrypter;
use Illuminate\Session\TokenMismatchException;
class VerifyCsrfToken {