Updating multiple records in a single query from existing data using the Laravel query builder
I have an inventory system with bins, lots, and transactions. Bin: has many lots Lot: belongs to a bin belongs to many transactions transaction_lot (pivot) - quantity Transaction: belongs to many lots Right now I have an attribute on Transaction…