{"action":"created","issue":{"url":"https://api.github.com/repos/slimphp/Slim/issues/1891","repository_url":"https://api.github.com/repos/slimphp/Slim","labels_url":"https://api.github.com/repos/slimphp/Slim/issues/1891/labels{/name}","comments_url":"https://api.github.com/repos/slimphp/Slim/issues/1891/comments","events_url":"https://api.github.com/repos/slimphp/Slim/issues/1891/events","html_url":"https://github.com/slimphp/Slim/issues/1891","id":156604255,"number":1891,"title":"Extend concept of route groups/names to route tags/properties","user":{"login":"alexweissman","id":5004534,"avatar_url":"https://avatars.githubusercontent.com/u/5004534?v=3","gravatar_id":"","url":"https://api.github.com/users/alexweissman","html_url":"https://github.com/alexweissman","followers_url":"https://api.github.com/users/alexweissman/followers","following_url":"https://api.github.com/users/alexweissman/following{/other_user}","gists_url":"https://api.github.com/users/alexweissman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexweissman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexweissman/subscriptions","organizations_url":"https://api.github.com/users/alexweissman/orgs","repos_url":"https://api.github.com/users/alexweissman/repos","events_url":"https://api.github.com/users/alexweissman/events{/privacy}","received_events_url":"https://api.github.com/users/alexweissman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2016-05-24T20:42:19Z","updated_at":"2016-08-06T15:15:52Z","closed_at":null,"body":"It would be useful if we could extend the idea of route groups (which is a many-to-one relationship) to route tags.  For example:\r\n\r\n```\r\n        // Front page\r\n        $app->get('/', function (Request $request, Response $response, $args) {\r\n            ...\r\n        })->tag('page');\r\n    \r\n        // About page\r\n        $app->get('/about', function (Request $request, Response $response, $args) {\r\n            ... \r\n        })->tag('page');  \r\n\r\n        // Retrieve flash messages (JSON format)\r\n        $app->get('/flash-messages', function (Request $request, Response $response, $args) {\r\n            ...\r\n        })->tag('api', 'messages');\r\n    \r\n        // Log the user out\r\n        $app->get('/logout', function (Request $request, Response $response, $args) {\r\n            ...\r\n        })->tag('api', 'auth'); \r\n```\r\n\r\nThese tags could then be used in middleware for more advanced filtering:\r\n\r\n```\r\n    $route = $request->getAttribute('route');\r\n    if ($route->hasTag('auth'){\r\n        // Do something only for auth-related requests\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/slimphp/Slim/issues/comments/238028175","html_url":"https://github.com/slimphp/Slim/issues/1891#issuecomment-238028175","issue_url":"https://api.github.com/repos/slimphp/Slim/issues/1891","id":238028175,"user":{"login":"danielgsims","id":695933,"avatar_url":"https://avatars.githubusercontent.com/u/695933?v=3","gravatar_id":"","url":"https://api.github.com/users/danielgsims","html_url":"https://github.com/danielgsims","followers_url":"https://api.github.com/users/danielgsims/followers","following_url":"https://api.github.com/users/danielgsims/following{/other_user}","gists_url":"https://api.github.com/users/danielgsims/gists{/gist_id}","starred_url":"https://api.github.com/users/danielgsims/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielgsims/subscriptions","organizations_url":"https://api.github.com/users/danielgsims/orgs","repos_url":"https://api.github.com/users/danielgsims/repos","events_url":"https://api.github.com/users/danielgsims/events{/privacy}","received_events_url":"https://api.github.com/users/danielgsims/received_events","type":"User","site_admin":false},"created_at":"2016-08-06T15:15:52Z","updated_at":"2016-08-06T15:15:52Z","body":"Is anyone else interested in continuing this discussion? It's been two months. Otherwise I am going to close my open PR associated with this discussion. Thanks!"}}
{"actor":{"display_login":"danielgsims"}}