This repository was archived by the owner on Oct 14, 2023. It is now read-only.

Description
Hello. I have 2 columns named "currency" and "bid" in my bids table in database. In the Currency column I store the currency types as USD, EUR, GBP. I keep the bid amounts written in the bid column. When I show the bids for the relevant request in the blade file, I want to show the average of these bid amounts. However, since the coin types are different, it collects other offer types only in numerical logic. example: 15 euros + 9 gbp = 24 usd.
example2: $bids->average(''bid) ; //12
The example should be:
1.09x15€=16.35$
1.30x9£=11.7$
16.35+11.7/2
avg = $28.05