@foreach ($list as $data)
@php
$users = DB::table("tr_voting")
->join("users", "users.id","=","tr_voting.id_user")
->where("id_option",$data->id)
->where("tr_voting.isactive","1")
->get();
// dd($data,$users);
// Dummy users data
// $users = [
// ['name' => 'John Doe', 'email' => 'john.doe@example.com'],
// ['name' => 'Jane Smith', 'email' => 'jane.smith@example.com'],
// ['name' => 'Alice Brown', 'email' => 'alice.brown@example.com'],
// ['name' => 'Bob Davis', 'email' => 'bob.davis@example.com'],
// ['name' => 'Lisa White', 'email' => 'lisa.white@example.com'],
// ];
@endphp
@foreach ($users as $user)
{{ $user->username }}
@endforeach
@endforeach