Answers for "laravel join where or where"

PHP
3

join in laravel eloquent

$customer = DB::table('customers')
                ->join('shops', 'customers.shop_id', '=', 'shops.shop_id')
                ->where('customer_contact', $contact_no)
                ->get();
Posted by: Guest on October-06-2020
0

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');
})
Posted by: Guest on June-23-2021

Browse Popular Code Answers by Language