Files
symfonycast.local/resources/views/course/index.blade.php
2022-11-17 11:38:20 +01:00

31 lines
960 B
PHP

<x-layout>
<h1>
{{ $course->name }}
</h1>
<a href="{{ route('course.sync', ['course' => $course->id]) }}">Sync all chapters offline</a>
<table class="table">
<thead>
<tr>
<th>Title</th>
<th>Duration</th>
<th>Sync offline</th>
</tr>
</thead>
@foreach($course->chapters()->get() as $chapter)
<tr>
<td><a href="{{ route('course.chapter', ['chapter' => $chapter->id]) }}">{{ $chapter->title }}</a></td>
<td>{{ $chapter->duration }}</td>
<td>{{ $chapter->sync_offline?'Yes':'no' }}</td>
<td>{{ $chapter->is_video_file?'Yes':'-' }}</td>
</tr>
@endforeach
<tr>
<td></td>
<td>Total: {{ $course->course_duration }}</td>
<td></td>
<td>Size: {{ $course->total_size_human }}</td>
</tr>
</table>
</x-layout>