Level 104
The roles is relationship is hasMany, correct? In that case, you would need to pluck the id from the roles Collection on each User instance, and then to echo the list, implode with a comma separator:
@foreach($data as $datum)
<tr>
// ...
<td>{{ $datum->roles->pluck('id')->implode(', ') }}</td>
// ...
More generally, you would need a nested loop to iterate over the relation Collection to output properties of the relation instances.
Aside, why name the variables $data and $datum, and not $users and $user?