Skip to content

Commit dc6fe49

Browse files
authored
Merge pull request #256 from andypost/routes-priority
Add $priority argument to ChainRouteCollection::add()
2 parents 87e59d1 + 7ec001d commit dc6fe49

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ChainRouteCollection.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,14 @@ public function count()
6666
/**
6767
* Adds a route.
6868
*
69-
* @param string $name The route name
70-
* @param Route $route A Route instance
69+
* @param string $name The route name
70+
* @param Route $route A Route instance
71+
* @param int $priority The route priority
7172
*/
72-
public function add($name, Route $route)
73+
public function add($name, Route $route, int $priority = 0)
7374
{
7475
$this->createInternalCollection();
75-
$this->routeCollection->add($name, $route);
76+
$this->routeCollection->add($name, $route, $priority);
7677
}
7778

7879
/**

0 commit comments

Comments
 (0)