I want all requests for which there is no route to be checked for the length of the characters after the domain. If the number is less than 5, a certain controller with a certain action should be called and if it is >=5, another controller and action should be called.
Sample: 1. https://test.com/abcd should be use this controller/action controller: color action: colortype
2. https://test.com/aabbc should use this controller/action controler: car action: type
3. https://test.com/infos should call infos controller, because there is a route saved into web.php or api.php
How can I realize it? Thanks for help.