@extends('layouts.adminapp')

@section('content')

<div class="d-flex justify-content-between align-items-center mb-3">
    <h3>Counselors</h3>

    <!-- ✅ Add Button -->
    <a href="{{ route('admin.counselor.create') }}" class="btn btn-success">
        + Add Counselor
    </a>
</div>

<table class="table table-bordered">
    <thead class="table-dark">
        <tr>
            <th>Name</th>
            <th>Assigned Leads</th>
        </tr>
    </thead>

    <tbody>
        @foreach($counselors as $c)
        <tr>
            <td>{{ $c->name }}</td>
            <td>{{ $c->assigned_count }}</td>
        </tr>
        @endforeach
    </tbody>
</table>

@endsection