@extends('layouts.app') @section('content')
@if($user->avatar_url) {{ $user->name }} @else
{{ strtoupper(substr($user->name, 0, 1)) }}
@endif

{{ $user->name }}

{{ $user->email }}

@if($user->roles->isNotEmpty())
@foreach($user->roles as $role) {{ ucfirst($role->name) }} @endforeach
@endif
@auth @if(Auth::id() === $user->id) @endif @endauth
@if($user->bio)

{{ $user->bio }}

@endif
{{ $stats['products_count'] }}
{{ Str::plural('Product', $stats['products_count']) }}
{{ $stats['total_upvotes'] }}
{{ Str::plural('Upvote', $stats['total_upvotes']) }}
{{ $stats['comments_count'] }}
{{ Str::plural('Comment', $stats['comments_count']) }}
@if($user->website || $user->twitter || $user->github || $user->linkedin)
@if($user->website) Website @endif @if($user->twitter) Twitter @endif @if($user->github) GitHub @endif @if($user->linkedin) LinkedIn @endif
@endif

Member since {{ $user->created_at->format('F Y') }}

Products by {{ $user->name }}

@if($products->total() > 0) Showing {{ $products->count() }} of {{ $products->total() }} {{ Str::plural('product', $products->total()) }} @else No products yet @endif

@if($products->count() > 0)
@foreach($products as $product) @include('components.product-card', ['product' => $product]) @endforeach
@if($products->hasPages())
{{ $products->links() }}
@endif @else

No products

{{ Auth::id() === $user->id ? "You haven't submitted any products yet." : "{$user->name} hasn't submitted any products yet." }}

@auth @if(Auth::id() === $user->id) @endif @endauth
@endif
@endsection