Created
November 17, 2016 17:52
-
-
Save akrabat/b72cc8a9fdb6e8110e591578e6c327c8 to your computer and use it in GitHub Desktop.
Use original request in Slim 3 middleware
This file contains 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 | |
$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