/**
* Register the URL generator.
*/
protected function registerUrlGenerator()
{
$this->app->singleton('api.url', function ($app) {
$url = new UrlGenerator($app['request']);
$url->setRouteCollections($app[Router::class]->getRoutes());
return $url;
});
}