diff --git a/src/Facade/API.php b/src/Facade/API.php index 75b00e97d..aaf008483 100644 --- a/src/Facade/API.php +++ b/src/Facade/API.php @@ -91,4 +91,17 @@ public static function router() { return static::$app['api.router']; } + + /** + * Get the API route of the given name, and optionally specify the API version. + * + * @param string $routeName + * @param string $apiVersion + * + * @return string + */ + public static function route($routeName, $apiVersion = 'v1') + { + return static::$app['api.url']->version($apiVersion)->route($routeName); + } }