Added helper file, replaced size file for human version as a helper method, next prev buttons for chapters.
This commit is contained in:
@@ -9,17 +9,35 @@
|
||||
<th>status</th>
|
||||
<th>Chapters</th>
|
||||
<th>Published at</th>
|
||||
<th>Estimate file size</th>
|
||||
<th>Actual size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($courses as $course)
|
||||
<tr>
|
||||
<td class="align-middle">{{ $course->id }}</td>
|
||||
<td><img src="{{ $course->thumbnail }}" alt="{{ $course->name }}" class="img-thumbnail" style="width: 70px;"></td>
|
||||
<td class="align-middle"><a href="{{ route('course.index', ['course' => $course->id]) }}">{{ $course->name }}</a></td>
|
||||
<td><img src="{{ $course->thumbnail }}" alt="{{ $course->name }}" class="img-thumbnail"
|
||||
style="width: 70px;"></td>
|
||||
<td class="align-middle"><a
|
||||
href="{{ route('course.index', ['course' => $course->id]) }}">{{ $course->name }}</a></td>
|
||||
<td class="align-middle">{{ $course->status }}</td>
|
||||
<td class="align-middle">{{ $course->chapters_count }} / {{ $course->numberofchapters }}</td>
|
||||
<td class="align-middle"><abbr title="{{ $course->published_at?->format('Y-m-d') }}">{{ $course->published_at?->diffForHumans() }}</abbr></td>
|
||||
<td class="align-middle"><abbr
|
||||
title="{{ $course->published_at?->format('Y-m-d') }}">{{ $course->published_at?->diffForHumans() }}</abbr>
|
||||
</td>
|
||||
<td class="align-middle text-end pe-4">{{ $course->total_size_human }}</td>
|
||||
<td class="align-middle text-end pe-4">{{formatFileSize(folderSize(public_path($course->id)))}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="align-middle text-end pe-4">{{ formatFileSize($courses->sum('total_size')) }}</td>
|
||||
<td class="align-middle text-end pe-4">{{formatFileSize(folderSize(public_path()))}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</x-layout>
|
||||
|
||||
Reference in New Issue
Block a user