I'm creating a REST API but I stumbled on this issue where I can not imagine a solution.
In my database I have 2 tables;
Table 1 - General product data such as name, code, sku and description
Table 2 - Variable product codes.
Table 3 - Product Images
For example; Product X contains sizes 1,2,3 and 2 images (these sizes and images are in separate tables of table 1).
How would I return a json with the related data between tables?
Currently I was only able to return a " all
" from table 1, what would be the logic applied in that situation so that I would return a json with product 1 and variations thereof?