Table builder with data from API rest
Hey!
I'm using the table builder in a custom livewire component to create a students table, and I'm querying the data from the models using the query builder notation, the student frequency data came from this same query, and its ok, but the grade information came from an external API call.
I was reading about this sushi package that fits perfectly for this kinda of occasion, but I've seen examples of the table being constructed over data that only came from the model that sushi it's applied, in my case, I'm getting the student data from a query and I should connect every student row to a grade that came from the API.
So I'm using a
->get()
in my ::query()
to foreach over all students returned from the query to fetch the grades, but I cannot construct the table after this approach, since I'm not returning an Builder Instance anymore...2 Replies
Query code:
#pt-br