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

{{ $user->name }}

@if($user->username)

@ {{ $user->username }}

@endif @if($user->bio)

{{ $user->bio }}

@endif
@if($user->location)
{{ $user->location }}
@endif @if($user->website) @endif
Joined {{ $user->created_at->format('M Y') }}
@if($user->hasSocialLinks()) @endif
{{ $user->videos->count() }}
Videos
{{ number_format($user->subscriber_count) }}
Subscribers
{{ \DB::table('video_views')->whereIn('video_id', $user->videos->pluck('id'))->count() }}
Views
{{ $user->likes->count() }}
Likes

Recent Videos

@if($user->videos->count() > 0)
@foreach($user->videos->take(4) as $video)
{{ $video->title }} {{ $video->duration ?? '0:00' }}

{{ Str::limit($video->title, 50) }}

{{ number_format($video->view_count ?? 0) }} views{{ $video->created_at->diffForHumans() }}
@endforeach
@if($user->videos->count() > 4) @endif @else

No videos yet

@endif

Edit Profile

@if(session('success'))
{{ session('success') }}
@endif
@csrf @method('PUT')
Max: 5MB

Social Links

@csrf @method('PUT')
@endsection