I am writing a web application with a front-oriented website and then an admin console. I would like to be able to have a parameter which, when set to true, means that the preview or maintenance page is displayed on the front-end website.
The configuration of my routes is currently in the yaml file and is read on every request. But now I want him to be smart enough to find out if he is in maintenance mode or not, and if he directs all the routes to one specific page. Or it can change routes, so there is only one.
I thought that this can be done with different files loaded based on this parameter, but then means that all routes are static and cannot be extracted from the database, for example. In addition, I had problems reading from the database during the query setup phase. I configured the system to read from the database as a service, but this, it seems, cannot be used at the setup stage, do I understand?
Any pointers gratefully received.
Russell
source
share