get('/', "$blog::index") ->bind('blog_list'); $collection->get('/{id}', "$blog::index2") ->assert('id', static::MAGIC) // Serve '(mount)/xyzzy' when asked for '(mount)'. ->value('id', static::MAGIC) ->bind('blog_mount'); $collection->get('/json', "$blog::json"); $collection->get('/json-view', "$blog::jsonView"); $collection->get('/{id}', "$blog::fifiAction") ->assert('id', '\d+') // See Symfony expression language. ->when("request.headers.get('User-Agent') matches '/firefox/i'"); $collection->get('/{id}', "$blog::show") ->assert('id', '\d+') // Serve '(mount)/1' when asked for '(mount)/'. ->value('id', 1) ->bind('blog_post'); return $collection; } }