How to multiply two columns from two different table with eloquent in laravel

Viewed 4918

order

  • id
  • currency_code
  • ex_rate_with_base
  • status
  • total_in_base_currency
  • status

currency

  • currency_code
  • symbol
  • currency_name
  • currency_value
  • ex_rate_with_base
  • status

order_list

  • id
  • order_id
  • product_code
  • qty
  • unit_price_in_base_currency
  • status

I want the following output:

Here I want to multiply the ex_rate_with_base field of order table with unit_price of order_list table using eloquent.

2 Answers
Related