Skip to content

Commit

Permalink
Fixed router bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita Chernyi committed Apr 6, 2018
1 parent 134a082 commit 2f273a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Router.php
Expand Up @@ -24,7 +24,7 @@ public function __invoke(\Slim\App $app): void
$controller = ('/' === $group_name || !$group_name) ? 'index' : \trim($group_name, '/');

foreach ($routes as $name => $route) {
$methods = $route['methods'] ?? ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'];
$methods = $route['methods'] ?? ['GET'];
$pattern = $route['pattern'] ?? '';
$callable = function (Request $request, Response $response, array $args = []) use ($controller, $route) {
return $this['controller']($controller)->__invoke($request, $response, $args);
Expand Down

0 comments on commit 2f273a8

Please sign in to comment.