@extends('layouts.app') @section('title', $playlist->name . ' | ' . config('app.name')) @section('extra_styles') @endsection @section('content')
@if($playlist->thumbnail_url) {{ $playlist->name }} @else @endif

{{ $playlist->name }}

{{ $playlist->video_count }} videos • {{ $playlist->formatted_duration }} • {{ $playlist->visibility === 'public' ? 'Public' : 'Private' }} @if($playlist->is_default) Watch Later @endif
@if($playlist->description)
{{ $playlist->description }}
@endif
@if($playlist->video_count > 0) Play All Shuffle @endif @if($playlist->canEdit(Auth::user())) @endif
@if($videos->isEmpty())

No videos in this playlist

Add videos to this playlist to watch them here.

@else
@foreach($videos as $index => $video)
@if($playlist->canEdit(Auth::user()))
@endif
{{ $index + 1 + ($videos->currentPage() - 1) * $videos->perPage() }}
{{ $video->title }} {{ $video->formatted_duration }}
{{ $video->user->name }} • {{ $video->view_count }} views • {{ $video->created_at->diffForHumans() }}
@if($playlist->canEdit(Auth::user()))
@csrf @method('DELETE')
@endif
@endforeach
{{ $videos->links() }}
@endif @if($playlist->canEdit(Auth::user())) @endif @endsection