@extends('layouts.admin')

@section('content')

<h2 style="margin-bottom:20px;">Daftar Karyawan</h2>

<div class="card">
<table>
<tr>
    <th>Nama</th>
    <th>Email</th>
    <th>Jabatan</th>
</tr>

@forelse($employees as $employee)
<tr>
    <td>{{ $employee->name }}</td>
    <td>{{ $employee->email }}</td>
    <td>{{ ucfirst($employee->role) }}</td>
</tr>
@empty
<tr>
    <td colspan="3">Tidak ada Karyawan ditemukan</td>
</tr>
@endforelse

</table>
</div>

@endsection