I have a table of measurements and a conversions to which is used to convert, say, cm into m.
My conversion table has the columns id, from, to, calculation, where from and to are database ids of my units.
I want to use a Laravel relationship to get the conversion data from my measurement model.
The keys I would like to join on are:
measurements.unit_id -> conversions.from
measurements.display_unit_id -> conversions.to
I can use a BelongsTo relationship but it seems limited to only join on one key, not two as I would like.