Last active
April 20, 2016 09:37
-
-
Save javiereguiluz/aa61f8695c881fb70f68 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/config/routing.php | |
use Symfony\Component\Routing\RouteCollection; | |
use Symfony\Component\Routing\Route; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
$collection = new RouteCollection(); | |
$collection->add('closure_controller', new Route('/closure', [ | |
'_controller' => function (Request $request) { | |
return new Response('A Closure Controller'); | |
}, | |
])); | |
return $collection; | |
// app/config/routing.yml | |
# ... | |
_closure: | |
resource: routing.php |
Hi guys! Is there a solution to this problem?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The compiled url matcher contains this: