Answers for "left join with where clause in laravel"

PHP
0

left join laravel

$users = DB::table('users')
            ->leftJoin('posts', 'users.id', '=', 'posts.user_id')
            ->get();

$users = DB::table('users')
            ->rightJoin('posts', 'users.id', '=', 'posts.user_id')
            ->get();
Posted by: Guest on February-03-2021
0

Laravel 8 query builder, Left Join / Right Join Clause

//Left join
$users = DB::table('users')
            ->leftJoin('posts', 'users.id', '=', 'posts.user_id')
            ->get();
//Right join
$users = DB::table('users')
            ->rightJoin('posts', 'users.id', '=', 'posts.user_id')
            ->get();
Posted by: Guest on August-06-2021

Code answers related to "left join with where clause in laravel"

Browse Popular Code Answers by Language