#Laravel 5 - PreventReplayAttack Middleware
Protect your app from Replay Attacks. The middleware uses an identifier together with the laravel cache to know which user has made a request. Currently you can specify wherever you want to use the session token as an unique identifier or chose an input field from which the the identifier is taken.
Simply copy the file across into the appropriate directory, and register the middleware in App\Http\Kernel.php. Either register it as a global HTTP middleware, or a route middleware. Alter variables within the middleware so they fit your needs, and you are good to go!