From 7a9fd586014f3bc49bf9a976d4270ed3bdfc3eff Mon Sep 17 00:00:00 2001 From: m1ngsama Date: Sun, 21 Dec 2025 12:00:00 +0800 Subject: [PATCH] Implement user profile pages Created user profile view showing posts, comments, and karma. Added user activity history with pagination. --- resources/views/users/show.blade.php | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 resources/views/users/show.blade.php diff --git a/resources/views/users/show.blade.php b/resources/views/users/show.blade.php new file mode 100644 index 0000000..5cdd42e --- /dev/null +++ b/resources/views/users/show.blade.php @@ -0,0 +1,57 @@ +@extends('layout') + +@section('title', 'u/' . $user->name) + +@section('content') +
+
+

u/{{ $user->name }}

+
+

Karma: {{ $user->karma }}

+

Joined {{ $user->created_at->diffForHumans() }}

+
+
+ +
+

Posts

+ @forelse($posts as $post) +
+

+ {{ $post->title }} +

+
+ r/{{ $post->community->name }} + • {{ $post->votes }} votes + • {{ $post->comments->count() }} comments + • {{ $post->created_at->diffForHumans() }} +
+
+ @empty +

No posts yet.

+ @endforelse +
+ {{ $posts->links() }} +
+
+ +
+

Comments

+ @forelse($comments as $comment) +
+

{{ Str::limit($comment->content, 200) }}

+
+ On {{ $comment->post->title }} + in r/{{ $comment->post->community->name }} + • {{ $comment->votes }} votes + • {{ $comment->created_at->diffForHumans() }} +
+
+ @empty +

No comments yet.

+ @endforelse +
+ {{ $comments->links() }} +
+
+
+@endsection