Browse Source

Teach RouteBuilder::prefix() to respect 'path'

Closes #10678
Rachman Chavik 8 years ago
parent
commit
610035c5fc
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/Routing/RouteBuilder.php

+ 6 - 1
src/Routing/RouteBuilder.php

@@ -612,7 +612,12 @@ class RouteBuilder
             $params = [];
         }
         $name = Inflector::underscore($name);
-        $path = '/' . $name;
+        if (isset($params['path'])) {
+            $path = '/' . $params['path'];
+            unset($params['path']);
+        } else {
+            $path = '/' . $name;
+        }
         if (isset($this->_params['prefix'])) {
             $name = $this->_params['prefix'] . '/' . $name;
         }