Skip to content

Commit

Permalink
Add ability to pass params to url generator route() (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
specialtactics authored Aug 21, 2024
1 parent 1622d39 commit bed0add
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Facade/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ public static function router()
* Get the API route of the given name, and optionally specify the API version.
*
* @param string $routeName
* @param array $parameters
* @param string $apiVersion
* @return string
*/
public static function route($routeName, $apiVersion = 'v1')
public static function route($routeName, $parameters = [], $apiVersion = 'v1')
{
return static::$app['api.url']->version($apiVersion)->route($routeName);
return static::$app['api.url']->version($apiVersion)->route($routeName, $parameters);
}
}

0 comments on commit bed0add

Please sign in to comment.