@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
@auth @if(Auth::user()->id === $user->id && $playlists && $playlists->count() > 0)

My Playlists

View all
@foreach($playlists->take(6) as $playlist)
@if($playlist->thumbnail_url) {{ $playlist->name }} @else
@endif {{ $playlist->video_count }}
{{ $playlist->name }}
@endforeach
@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) @endforeach
{{ $videos->links() }}
@endif @include('layouts.partials.share-modal') @endsection @section('scripts') @endsection