I need to use a custom Implementation of UrlGenerator. So how can I change the default binding of laravel, that is implemented somewhere deep in the core as

 'url'                  => ['IlluminateRoutingUrlGenerator', 'IlluminateContractsRoutingUrlGenerator'],

against my own implementation?

Furthermore I am not shure. I assume this line above does actually two things. it will store the bindinung under the key “url” and it will also do the mapping of the Interface to the class. So I actually need to override both! How to do that? Furthemore how to find out if this must be bound as “shared”(singleton) or “new instance every time”?

Thanks very much!