When working with routes for an entity, you have probably created a route path with parameter in the following format /node/{node}/edit
where name node
was your custom entity ID.
What is interesting about this path format is that the parameter {node}
gets converted into an entity object and is later available inside your controller action as an argument. The process is called route upcasting. Let's dig deeper to see how it works.