Skip to content

Commit bed0add

Browse files
Add ability to pass params to url generator route() (#55)
1 parent 1622d39 commit bed0add

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Facade/API.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,12 @@ public static function router()
9494
* Get the API route of the given name, and optionally specify the API version.
9595
*
9696
* @param string $routeName
97+
* @param array $parameters
9798
* @param string $apiVersion
9899
* @return string
99100
*/
100-
public static function route($routeName, $apiVersion = 'v1')
101+
public static function route($routeName, $parameters = [], $apiVersion = 'v1')
101102
{
102-
return static::$app['api.url']->version($apiVersion)->route($routeName);
103+
return static::$app['api.url']->version($apiVersion)->route($routeName, $parameters);
103104
}
104105
}

0 commit comments

Comments
 (0)