Answer the question
In order to leave comments, you need to log in
How to make a request in laravel?
Why does the on() method turn the alias dt into prefix_dt?
The muscle naturally swears at the lack of prefix_dt.idfd:
Unknown column 'prefix_dt.idfd' in 'on clause'
->leftJoin(DB::raw("(SELECT MAX(sdp.saledate) AS saledate, sdp.branch AS idfd FROM prefix_params sdp GROUP BY sdp.branch) AS dt"),
function($join)
{
$join->on('dt.idfd', "=", 'branches.id');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question