@props([ 'video', 'tag' => 'button', // 'button' or 'a' ]) {{-- Canonical "Save to playlist" trigger. Opens the single (included once in layouts/app.blade.php) via openAddToPlaylistModal(numericId). Always passes $video->id, never the route key — the backend validates against videos.id. --}} @php $onclick = "openAddToPlaylistModal({$video->id})"; @endphp @if($tag === 'a') @if($slot->isEmpty()) Save to playlist @else {{ $slot }} @endif @else @endif