Routing is important for every website as well as application. Today I am going tell about the mechanism of routing in web engineering. Basically routing will decide where will be your destination? In laravel, there is a special class for routing. Lets open app>routes.php files.
In this file, we are grabbing Route class from core Route class (vendor > laravel > framework > src > Illuminate > Routing > Route.php). Inside the core Route class, there is a static get() function and we are by default using this get() function. Inside this function, we laravel created a another function as a parameter.
Now, going inside this function, you will see there is a return option. But you have to understand how this function will work. Well, considering this function, I am going to comments the return option and put something new as follows-