संपादित:
$team = Team::find($id);
$users = User::join('teams', 'teams.id', '=', 'users.team_id')
->whereBetween('teams.l', [$team->l, $team->r])
->get(['users.id', 'users.username']);
संपादित:
$team = Team::find($id);
$users = User::join('teams', 'teams.id', '=', 'users.team_id')
->whereBetween('teams.l', [$team->l, $team->r])
->get(['users.id', 'users.username']);