@extends('layouts.app') @section('content')
| Trainer Name | Phone | County | Sub-County | Center | Class | Total | Paid | Due | Actions | |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $a->trainer_name }} | {{ $a->trainer_phone }} | {{ $a->trainer_email }} | {{ $a->county->name ?? '-' }} | {{ $a->subCounty->name ?? '-' }} | {{ $a->Center->name ?? '-' }} | {{ $a->classRoom->class_number ?? '-' }} | Ksh {{ number_format($a->total_amount, 2) }} | {{ number_format($a->amount_paid, 2) }} | {{ number_format($a->amount_due, 2) }} | Edit @php // Safely fetch the trainer user $trainerUser = \App\Models\User::find($a->trainer_id); @endphp @if($trainerUser && $trainerUser->role === 'trainer') @endif |
| No trainer assignments found. | ||||||||||