Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

How to add a additional condition in a join using query builder laravel 5.3?


->leftJoin('table3 AS c', function($join){
        $join->on('a.field2', '=', 'c.field2')
        ->where('a.field2', '=', true)
        ->where('a.field3', '=', 'c.field3');
})
Source by laracasts.com #
 
PREVIOUS NEXT
Tagged: #How #add #additional #condition #join #query #builder #laravel
ADD COMMENT
Topic
Name
8+4 =