PHP code example of moln / expressive-callable-middleware-compat
1. Go to this page and download the library: Download moln/expressive-callable-middleware-compat library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
moln / expressive-callable-middleware-compat example snippets
class TestMiddleware {
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) {
return $next($request, $response);
}
}
$app->pipe(TestMiddleware::class);