-
- @forelse($messages as $msg)
- @php
- $isSecret = $msg->secret == 1;
- $isToMe = Auth::check() && $msg->towho === Auth::user()->username;
- $isFromMe = Auth::check() && $msg->who === Auth::user()->username;
- @endphp
-
-
-
- @if ($isSecret)
-
- 🔒 私密信件
-
- @endif
-
-
-
- {{ $msg->who }}
- 给
- {{ $msg->towho ?: '大家' }}
- 留言:
-
-
- {{ \Carbon\Carbon::parse($msg->post_time)->diffForHumans() }}
-
- @if ($isFromMe || $isToMe || (Auth::check() && Auth::user()->user_level >= 15))
-
- @endif
-
+ {{-- 写信/留言表单区 (Alpine 控制显隐) --}}
+
+
+
- {{-- 移动端悬浮写留言按钮 --}}
-
+ {{-- 主体内容区 --}}
+
- {{-- 移动端底部分类栏 --}}
-
@endsection
-
- 🌍
- 公共墙
-
-
- 📥
- 收件箱
-
-
- 📤
- 发件箱
-
+ {{-- 左侧:分类导航 --}}
+
+
+ {{-- 右侧:留言流列表 --}}
+
+
+
+
+ {{-- 移动端悬浮写留言按钮 --}}
+
+
+ {{-- 移动端底部分类栏 --}}
+
+
+ @forelse($messages as $msg)
+ @php
+ $isSecret = $msg->secret == 1;
+ $isToMe = Auth::check() && $msg->towho === Auth::user()->username;
+ $isFromMe = Auth::check() && $msg->who === Auth::user()->username;
+ @endphp
+
+
+
+
+ @if ($isSecret)
+
+ @empty
+
+ 🔒 私密信件
+
+ @endif
+
+
+
+
+
+ {{ $msg->who }}
+ 给
+ {{ $msg->towho ?: '大家' }}
+ 留言:
+
+
+ {{ \Carbon\Carbon::parse($msg->post_time)->diffForHumans() }}
+
+ @if ($isFromMe || $isToMe || (Auth::check() && Auth::user()->user_level >= 15))
+
+ @endif
+
+
+ {!! nl2br(e($msg->text_body)) !!}
+
+
+ @if (!Auth::check() || $msg->who !== Auth::user()->username)
+
+
+
+ @endif
+
+ 📭
+
+ @endforelse
+
+ {{-- 分页 --}}
+ 暂无信件
+这里是空空如也的荒原。
+ +
+ {{ $messages->links() }}
+
+
+