<!DOCTYPE html>
<html>
<head>
    <title>Ads 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>Ads Statistics Report</h1>
<table>
    <thead>
    <tr>
        <th>No</th>
        <th>Ad ID</th>
        <th>Customer Name</th>
        <th>Customer Email</th>
        <th>Category</th>
        <th>City</th>
        <th>Plan</th>
        <th>Is Featured</th>
        <th>Status</th>
        <th>Created On</th>
    </tr>
    </thead>
    <tbody>
    @foreach($ads as $index => $ad)
        <tr>
            <td> {{ ($index+1) }} </td>
            <td> {{ $ad->id }} </td>
            <td> {{ $ad->customer->first_name??''.' '.$ad->customer->last_name??'' }} </td>
            <td> {{ $ad->customer->email??'' }} </td>
            <td> {{ $ad->category->name_with_parent_category_name }} </td>
            <td> {{ $ad->city->name }} </td>
            <td> {{ $ad->plan->name }} </td>
            <td> {{ $ad->is_featured ? 'Yes' : 'No' }} </td>
            <td> {{ $ad->status ? 'Active' : 'Inactive' }} </td>
            <td> {{ $ad->created_at->format('d/m/y H:i A') }} </td>
        </tr>
    @endforeach
    </tbody>
</table>
</body>
</html>
