{{-- 動畫教學:播放器 + 同步字幕。字幕時間軸寫在 $lesson->config['steps'] --}} @php $cfg = $lesson->config ?? []; $steps = collect($cfg['steps'] ?? [])->map(fn ($s) => ['at' => (float) ($s['at'] ?? 0), 'text' => $s['text'] ?? ''])->values(); $alreadyDone = auth()->user()->progress()->where('lesson_id', $lesson->id)->whereNotNull('completed_at')->exists(); @endphp