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

wreed's avatar
Level 1

Pulling Back Multiple Datasets Using Eloquent

I am a .net developer first and foremost, so I am saying datasets but my question is and I am not sure of the right way to search for this to get my answer. I have set up Laravel and did some easy data pulls using Eloquent with a single table and a one to many setup. What happens when I need to pull multiple datasets to accomplish something like this....should I just do multiple datasets or do a one to many tables relationship based on team name? Say for example 3 tables, players, teamstats and injuries. These all related to the value in the URL as the team name, do I try to do one model and link everything up on the team name or is it better to just do 3 eloquent models with no relation? This is read only data and will not be updated at all on this page/controller. Thanks for your time.

http://www.sportsnet.ca/hockey/nhl/teams/new-york-rangers/

0 likes
0 replies

Please or to participate in this conversation.