auditionadmin/resources/views/admin/schools/index.blade.php

37 lines
1.3 KiB
PHP

<x-layout.app>
<x-slot:page_title>School Administration</x-slot:page_title>
<x-card.card>
<x-table.table with_title_area>
<x-slot:title class="ml-3">Schools</x-slot:title>
<x-slot:subtitle class="ml-3">Click school name to edit</x-slot:subtitle>
<x-slot:title_block_right class="mr-3">
<x-form.button href="{{ route('admin.schools.create') }}">New School</x-form.button>
</x-slot:title_block_right>
<thead>
<tr>
<x-table.th>Name</x-table.th>
<x-table.th>Directors</x-table.th>
<x-table.th>Students</x-table.th>
<x-table.th>Entries</x-table.th>
</tr>
</thead>
<x-table.body>
@foreach($schools as $school)
<tr>
<x-table.td><a href="/admin/schools/{{ $school->id }}">{{ $school->name }}</a></x-table.td>
<x-table.td>{{ $school->users->count() }}</x-table.td>
<x-table.td>{{ $school->students->count() }}</x-table.td>
<x-table.td>{{ $school->entries->count() }}</x-table.td>
</tr>
@endforeach
</x-table.body>
</x-table.table>
</x-card.card>
</x-layout.app>