Model Refreshing (Using DB Join)

Hey all,

Need a bit of guidance, currently got a list of auctions within my database, clicking on Seller does an api request from the server and updates the model - the issue I’m facing is that the card updates to a completely random one.

I’m currently using a join (as I need to sort these by the auction_item with the average_price column, since doing this it has caused this ‘bug’.

Code: https://pastebin.com/YN7X6MwN
Video: https://cdn.discordapp.com/attachments/698231501501890600/833039162676346912/CleanShot_2021-04-17_at_7.00.03.mp4

How can I fix this?

Thank you.

I think the SELECT statement has to come before the JOIN unless Laravel does some magic to shuffle the order of operations.

1 Like