We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7a73525 + 98f9a6f commit b50f9dcCopy full SHA for b50f9dc
1 file changed
library/Respect/Rest/Router.php
@@ -145,6 +145,14 @@ public function __call($method, $args)
145
146
list ($path, $routeTarget) = $args;
147
148
+ // Support multiple route definitions as array of paths
149
+ if (is_array($path)) {
150
+ $lastPath = array_pop($path);
151
+ foreach ($path as $p)
152
+ $this->$method($p, $routeTarget);
153
+ return $this->$method($lastPath, $routeTarget);
154
+ }
155
+
156
//closures, func names, callbacks
157
if (is_callable($routeTarget)) {
158
0 commit comments