Overview
URLs are not to be confused with Routes in Laravel. You can create routes for a number of resources, but most commonly they would be created for a Product. They allow you to add a way to identify/query for a resource without having to use the ID of that resource. Notably these would be useful for vanity URLs so instead of something like:apple-iphone is the slug for a URL which would correspond to a product and would allow you to fetch it easily without having to expose IDs or do any weird round trips to your API.
A URL cannot share the same 
slug and language_id columns. You can also only have one default URL per language for that resource.Creating a URL
If you add a new default URL for a language which already has one, the new URL will override and become the new default.
Deleting a URL
When you delete a URL, if it was the default then Lunar will look for a non default of the same language and assign that instead.Adding URL support to Models
Out the box Lunar has a few pre-configured models which have URLs- Products
 - Collections
 
url relationship which is Polymorphic.
Automatically generating URLs
You can tell Lunar to generate URLs for models that use theHasUrls trait automatically by setting the generator config option in config/lunar/urls.php.
By default this is set to Lunar\Generators\UrlGenerator::class which means URLs will be generated. To disable this, set the config like below:
name attribute as the slug, you are of course free to use your own class for this. You just need to make sure there is a handle method which accepts a Model.