Routing is one of the essential concepts. It allows you to route all your application requests to its appropriate controller. The main and primary routes acknowledge and accept a URI (Uniform Resource Identifier) along with a closure, given that it should have to be a simple and expressive way of routing.

The following figure illustrates the Routing process.

All routes are defined in your route files, which are located in the routes directory. For more details, see Laravel's documentation

# Routing in VaahCms

In VaahCms, there are three type of route files;

  • api.php: The routes in Routes/api.php are stateless and are assigned the api middleware group.
  • backend.php: The routes in Routes/backend.php are generally use for Backend or Module.
  • frontend.php: The routes in Routes/frontend.php are generally use for Frontend or Theme.