创建2路功能

I'm struggling to create a similar function but currently I have the following function:

//$amount (int) (anything from 10000 - 1000000)
//$platform (string) (XBOX or PS)

private function getPrice($platform, $amount) {
    $price = DB::table('platform_prices')->where('platform', $platform)->first();
    return $amount / 10000 * $price->price_per_10k;
}

This basically gets the price of a currency for a specified platform (which is stored in the DB based on per 10,000 currency).

As an example:

return $this->getPrice('XBOX', '50000'); //3.50

How can I create the same function but accepting the 3.50 as a value for $amount & have it return 50000.

Writing down on a sheet of paper

if `$price = $amount / 10000 * price_per_10k` 
then `$amount = $price * 10000 / price_per_10k`

As a function:

private function getWhatever($platform, $price) {
    $priceData = DB::table('platform_prices')->where('platform', $platform)->first();
    return $price * 10000 / $priceData->price_per_10k;
}