join query laravel with condition code example
Example 1: laravel + join 2 eloquent queries
$select->joinSub(
$selectSubQry,
'ag',
'ag.id',
'=',
'agp.userId'
);
Example 2: laravel outer join
->join('answers as answers', 'responses.answer_id', '=', 'answers.id', 'left outer')