$serviceId = Service::select('id')->where('provider_id', Auth::user()->id)->where('is_deleted', 0);
$list = DB::table('service_galleries')
->where('is_deleted', 0)
->joinSub($serviceId, 'sid', function ($qry) {
$qry->on('service_galleries.service_id', '=', 'sid.id');
})->get();
From the above code I need id of every row in service galleries table but is return service_id in the field of id, which means service_id and id is same
leftJoinSub