Bolt Internals / Routing
Note: You are currently reading the documentation for Bolt 2.2. Looking for the documentation for Bolt 5.2 instead?
Every request to a page on a Bolt website is routed to a Silex controller, regardless of whether the request is for a page in the 'backend', 'frontend' or 'asynchronous'.
There are four files that contain the controller collections, located in
src/Controllers/: Backend.php, Frontend.php, Async.php and
Routing.php.
As such, they are all in the \Bolt\Controllers namespace. They are 'set up'
in src/Application.php.
Backendroutes are all pretty straightforward.Async.phproutes are used for 'ajaxy' requests, like the 'latest activity' widget on the dashboard.Routingis the actual Controller that parses the routes found inrouting.ymlFrontendcontains the methods for all standard routes as defined inroutes.yml.
You can modify the routing.yml to suit your own needs. Examples are included.
Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.