DEV Community

ilya
ilya

Posted on

Hello, Please help me in laravel model

i am changing query to laravel model.
but only one problem...
->join(array(\DB::expr('(select SUM(p.amount) as paid, p.case_id
from payments p
where p.status_id = 3
group by p.case_id)'),'p'), 'LEFT')->on('p.case_id','=','c.id')
this is leftjoin subquery but i have to change to laravel model type.
Please help me.

Top comments (0)