Open matthewp opened 6 years ago
I would go through the extra effort to allow both. Assume route("{page}")
is equivalent to route("/{page}")
and vice versa.
Therefore we would also have to assume that route.deparam("/") === route.deparam("")
You could, in documentation, recommend a particular way of doing things (like excluding the leading slash) but it is inevitable that someone will mess it up and not know why. And I think it is the framework's job to compensate for this sort of 'foot-gun' stuff.
If you have a route like:
vs.
This is not ideal, maybe we just say that you must exclude the leading slash?