<?php

namespace App\Http\Controllers\Coach;

use App\Http\Controllers\Controller;
use Illuminate\View\View;

class AthleteListController extends Controller
{
    /**
     * «ورزشکاران من» — طبق بند ۴۸، بخشی از داشبورد مربی.
     */
    public function index(): View
    {
        $coach = auth()->user()->coach;

        $athletes = $coach->activeAthletes()->with('user')->get();

        return view('coach.athletes.index', compact('athletes'));
    }
}
