Skip to content

Instantly share code, notes, and snippets.

@freen
Created June 18, 2013 18:45
Show Gist options
  • Save freen/5808111 to your computer and use it in GitHub Desktop.
Save freen/5808111 to your computer and use it in GitHub Desktop.
Slim Route closure is treated as Route Middleware when I include Route Middleware after my Route Closure.
<?php
$app->get('/collection/:id/', function($id) use ($app) {
// This is true:
if('Slim\Route' === get_class($id)) {
die('Oh no it thinks my route closure is route middleware :(');
}
}, 'Middleware::oneMiddlewareFunction');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment