php - How do I list out all paths I've defined into an array in Slim Framework 4? ← (PHP, Slim)

one text

Context: I am using Slim Framework 4 and I am trying to build an auto generated /sitemap.xml

I would like to do something like this...

foreach ($app->get(WANT_TO_LIST_EACH_OF_THESE_PATHS) as $path) {
echo $domain.path;
}

And then wrap some XML around that for the sitemap.xml.

How would I go about doing this in Slim Framework 4?

Source