DEV Community

ilya
ilya

Posted on

how to convert sql query to laravel model style without DB?

->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 sql query of fuelphp
i am going to convert it to laravel query style to not use DB.
DB means illumiate\Fascade\DB;
how?

Top comments (0)