hello friends i have this query that runs using sql editor but i have no idea how to write this query using laravel.please help me out.

```
SELECT 
  date,
  memo,
 (COALESCE(CASE WHEN drcr = 'dr' THEN amount END,0)) total_debits,
 (COALESCE(CASE WHEN drcr = 'cr' THEN amount END,0)) total_credits,
@b := @b + (COALESCE(CASE WHEN drcr = 'cr' THEN amount END,0)) - (COALESCE(CASE WHEN drcr = 'dr' THEN amount END,0)) balance
FROM
(SELECT @b := 0.0) AS dummy 
CROSS JOIN
tbl_bankrecords
ORDER BY
date

```