I am trying to get the four highest objects based on the attribute in them.
I can successfully get the one with the highest value by doing the following:
{{ Bid::where('auction_id', '=', $auction->id)->max('bid_amount') }}
What gets the object with the highest value bid_amount.
Now I could create a loop and encode all the bets, but Laravel should have a smarter way to do this, and I could not find it in my documentation.
source
share