No one? Or can someone guide me to the solution if there is a function for these kind of tasks. I'm quite new to this...
I would just create a view for the scores, corresponding model, and make a relationship linking User
and Score
, if you want to leverage Eloquent features like eager loading etc.
Thanks Jarektkaczyk. But I don't really understand how a Score view could help me here. Do you mean Model or Migration? View in my world is just a sheet of html and blade. Eager loading seems like a good way to start, but I'm still struggeling with the Person model to achieve it correctly
By VIEW I mean MySQL view (or any other db you use). for this is the place to handle such things. Eloquent is not the right tool for complex relations between tables, but when you do it on db part, then you can leverage Eloquent models like usually.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community