@extends('layouts.app')
@section('title', $user->name . ' 的個人主頁')
@push('styles')
@endpush
@section('content')
動態
@if ($isOwn)
@error('media')
{{ $message }}
@enderror
@foreach ((array) $errors->get('media.*') as $msgs)
@foreach ($msgs as $m)
{{ $m }}
@endforeach
@endforeach
@endif
@if ($posts->isEmpty())
還沒有任何動態
@else
@foreach ($posts as $post)
@php $canManagePost = $isOwn || $me->isAdmin(); @endphp
@if ($post->user?->avatarUrl())
 }})
@else
{{ mb_substr($post->user->name ?? '?', 0, 1) }}
@endif
{{ $post->user->name ?? '' }}
{{ $post->created_at->format('Y-m-d H:i') }}
@if ($canManagePost)
@endif
@if ($post->caption)
{{ $post->caption }}
@endif
@if ($post->media->isNotEmpty())
@endif
@endforeach
{{ $posts->links() }}
@endif
@endsection
@push('scripts')
@endpush