Skip to content

Commit

Permalink
Fixed creation of routes
Browse files Browse the repository at this point in the history
  • Loading branch information
VeeeneX committed Jul 6, 2015
1 parent 6631ec6 commit 6713ae6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,20 @@ public function addRoute($method, $route, $action, $name = null, $definitions =
//unset($methods[$i]);
}
}
if ($name === null) {
$this->rawRoutes[] = [
'route' => $this->baseUri.$route,
'method' => $methods,
"definitions" => $definitions
];
} else {
$this->rawRoutes[$name] = [
'route' => $this->baseUri.$route,
'method' => $methods,
"definitions" => $definitions
];
}

$this->rawRoutes[$name] = [
'route' => $this->baseUri.$route,
'method' => $methods,
"definitions" => $definitions
];
}

/**
Expand Down

0 comments on commit 6713ae6

Please sign in to comment.