<!DOCTYPE html>
<html>
<head>
    <title>User Statistics</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 8px;
        }
        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2;
        }
        span {
            font-size: 9px;
        }
    </style>
</head>
<body>
<h1>User Statistics Report</h1>
<table>
    <thead>
    <tr>
        <th>No</th>
        <th>First Name</th>
        <th>Last Name</th>
        <th>Total Ads</th>
        <th>Featured Ads</th>
    </tr>
    </thead>
    <tbody>
    @foreach($users as $index => $user)
        <tr>
            <td> {{ ($index+1) }} </td>
            <td> {{ $user->first_name }} </td>
            <td> {{ $user->last_name }} </td>
            <td> {{ $user->ads->count() }} </td>
            <td> {{ $user->featured_ads->count() }} </td>
        </tr>
    @endforeach
    </tbody>
</table>
</body>
</html>
