What you did is totally fine:
$users = $event->load('bookings.user')
->bookings
->map->user;
In addition, A very popular approach is to create a many to many relationship between the Event and the User model, using Booking as a pivot.
class Event extends Model
{
public function bookedUsers()
{
return $this->belongsToMany(User::class, 'bookings', 'event_id', 'user_id');
}
}
// Then you can simply call
$event->bookedUsers;
Can a user make one OR numerous bookings for a single event? If the latter is true, there might be duplicated users from that relationship and you can do this:
$event->bookedUsers->unique();