Files
symfonycast.local/resources/views/course/index.blade.php

38 lines
1.4 KiB
PHP

<x-layout>
<h1>
<a href="/" class="text-decoration-none">List</a> &raquo; {{ $course->name }}
</h1>
<a href="{{ 'https://symfonycasts.com/screencast/'.$course->link }}">Visit course page</a>
<a href="{{ route('course.sync', ['course' => $course->id]) }}">Sync all chapters offline</a>
<a href="{{ route('course.update', ['course' => $course->id]) }}">Update course</a>
<table class="table">
<thead>
<tr>
<th>Title</th>
<th>Duration</th>
<th>Sync offline</th>
<th>Synced offline</th>
<th>File size</th>
</tr>
</thead>
@foreach($course->chapters()->get() as $chapter)
<tr>
<td><a href="{{ route('course.chapter', ['course' => $course->id, 'chapter' => $chapter->order]) }}"
class="text-decoration-none">{{ $chapter->title }}</a></td>
<td>{{ $chapter->duration }}</td>
<td>{{ $chapter->sync_offline?'Yes':'no' }}</td>
<td>{{ $chapter->is_video_file?'Yes':'-' }}</td>
<td>{{ $chapter->video_size_human }}</td>
</tr>
@endforeach
<tr>
<td></td>
<td>Total: {{ $course->course_duration }}</td>
<td></td>
<td></td>
<td>Size: {{ $course->total_size_human }}</td>
</tr>
</table>
</x-layout>