PHP Slim RESTful API - Two Table Join Nested JSON
问题 I currently am working on a RESTful API with the PHP Slim Framework. I currently encountered the following problem: I have to tables with an 1:n cardinality. With an GET-Call I want to get the data of the main table and nested in there all of the tables with the foreign key. Like this: Planed Result [{ "id":"1", "ueberschrift":"UEBER", "text_kurz":"Lorem ipsum...", "kategorie":"HEAL", "bilder":[ {"src":"wed1.png"}, {"src":"wed2.png"} ]},...... This is how a part of my mysql database looks