MySql Statement History with user balance algorithm – Laravel
I have a table with payment history payments: id consumer_id amount created_at 1 1 30 2021-05-11 13:01:36 2 1 -10 2021-05-12 14:01:36 3 1 -2.50 2021-05-13 13:01:36 4 1 -4.50 2021-05-14 13:01:36 5 1 20 2021-05-15 13:01:36 In final result…