//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();