Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

brunitosessa's avatar

Api resources

Hi, I'm trying to create an api resource to return data to an ionic project. I need to include in one response information about two models. Following best practices, which would be the best approach to do this?

0 likes
3 replies
brunitosessa's avatar

Thanks for the replay @sti3bas. I need to return data about two diferents models. For example, I need to send information about a Bar (Bar model) and also, in the same response, data about if the logged user can or can't use bar's promotions.

Please or to participate in this conversation.