Skip to content

Instantly share code, notes, and snippets.

@akrabat
Created November 17, 2016 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akrabat/b72cc8a9fdb6e8110e591578e6c327c8 to your computer and use it in GitHub Desktop.
Save akrabat/b72cc8a9fdb6e8110e591578e6c327c8 to your computer and use it in GitHub Desktop.
Use original request in Slim 3 middleware
<?php
$app->add(function ($request, $response, $next) {
// use the original request and ignore the one passed into us
$request = $this->get('request');
// do something here
// continue
return $next($request, $response);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment