Skip to content

Commit 99c865e

Browse files
specialtacticsthilanga
authored andcommitted
return Route from RouteCollection::add() for upstream compatibility with Laravel Router (dingo#1555)
1 parent b05f646 commit 99c865e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Routing/RouteCollection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ class RouteCollection implements Countable, IteratorAggregate
3434
*
3535
* @param \Dingo\Api\Routing\Route $route
3636
*
37-
* @return void
37+
* @return \Dingo\Api\Routing\Route
3838
*/
3939
public function add(Route $route)
4040
{
4141
$this->routes[] = $route;
4242

4343
$this->addLookups($route);
44+
45+
return $route;
4446
}
4547

4648
/**

0 commit comments

Comments
 (0)