@extends('layouts.shell') @section('title', 'Daftar Saya') @section('content')

Daftar Saya

@if($grouped->isEmpty()) @else @php $titles = ['Video' => 'Video', 'Series' => 'Kelas Berseri', 'Article' => 'Artikel', 'Event' => 'Event']; @endphp @foreach($grouped as $type => $items)

{{ $titles[$type] ?? $type }}

@foreach($items as $b) @php $m = $b->bookmarkable; @endphp @php $href = match($type){ 'Video' => route('video.show', $m->slug), 'Series' => route('series.show', $m->slug), 'Article' => route('articles.show', $m->slug), 'Event' => route('events.show', $m->slug), default => '#', }; $img = match($type){ 'Video' => $m->thumbnailUrl(), 'Series','Event','Article' => $m->coverUrl(), default => null, }; @endphp
@if($img)@endif

{{ $m->title }}

Disimpan {{ $b->created_at->diffForHumans() }}

@csrf
@endforeach
@endforeach @endif @endsection