أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
Routes are basically paths the user takes which are attached to code that will be triggered when a user reaches the specific route.
It takes a much cleaner and clearer approach to cut down on the added hierarchy complexity that MVC can add.
In simple words:
Router helps web server to fetch an appropriate and exact information for user.
It is like Station Master at railway station, who informs to Train Driver to change track for crossing other train.
Router or routing in web development is more like managing a well-organized redirecting systemwhich mostly would be something like thissay you have a model which called "users"and it contains a method called "new" , "edit" Or even "view"and then you have something like the ID of the userwith a good routing system your link should "user/edit/1"so your app will always take the first arg as a "Model" and find it in your models, then search for the2nd arg as "method" inside that Model, then use the3rd arg as an "id" if needed.the most flexible routing system i'v seen so far is the Zend framework Routing one.