In the following:
DB::table('users')
->join('item', 'users.id', '=', 'item.user_id')
->select('item.name')
->get();
Is there a way to reference 'item.name' as just 'name'?
Sure. You need to use either DB::raw or selectRaw
select(DB::raw('item.name AS name'))
Or
selectRaw('item.name AS name')
selectRaw('item.name AS name, item.name2 AS name2')