this is more of a can i do it simpler and more leaner kind of question:
i setup a controller (
api.php) + template (
api.json.php) + content/page (
/api) to create an API endpoint where kirby is fetching some data from another external service. this all works.
i was wondering, and had some vague memories, that maybe this might be all possible to do by using only a router in
config.php? or not?
- if yes, is it allowed to call a php library from within
- if not, then maybe i can still use a route and being able to ditch
/template/ap.json.phpand only keep the controller?