Dingo\Api\Provider\RoutingServiceProvider::registerUrlGenerator PHP Method

registerUrlGenerator() protected method

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