@extends('layouts.app') @section('title', $user->name . "'s Channel | TAKEONE") @section('extra_styles') @endsection @section('content')
@if($user->avatar) {{ $user->name }} @else {{ $user->name }} @endif

{{ $user->name }}

Joined {{ $user->created_at->format('F d, Y') }}

{{ $videos->total() }} videos
{{ \DB::table('video_views')->whereIn('video_id', $user->videos->pluck('id'))->count() }} views
@auth @if(Auth::user()->id === $user->id) @endif @endauth
@if($videos->isEmpty())

No videos yet

This channel hasn't uploaded any videos.

@auth @if(Auth::user()->id === $user->id) Upload First Video @endif @endauth
@else
@foreach($videos as $video)
@if($video->thumbnail) {{ $video->title }} @else {{ $video->title }} @endif @if($video->duration) {{ gmdate('i:s', $video->duration) }} @endif
@if($video->user && $video->user->avatar_url) {{ $video->user->name }} @endif

{{ $video->title }}

{{ $video->user->name ?? 'Unknown' }}
{{ number_format($video->size / 1024 / 1024, 0) }} MB • {{ $video->created_at->diffForHumans() }}
@endforeach
{{ $videos->links() }}
@endif @include('layouts.partials.share-modal') @endsection @section('scripts') @endsection