Files
laralog/resources/views/profile.blade.php
T
goukiandCursor debead72a5
Build and Deploy / verify (push) Failing after 15m18s
Build and Deploy / deploy (push) Skipped
feat: add frontend admin shortcut for staff
Let admin and editor open /admin in a new tab from the public header and profile, so they can jump to the backend without leaving the site.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 23:42:54 +00:00

29 lines
1.3 KiB
PHP

@php $pageTitle = '个人中心 - '.$siteName; $user = auth()->user(); @endphp
@include('partials.head')
<body>
@include('partials.header')
<div class="container main-layout">
<main class="content">
<h1 class="list-title">个人中心</h1>
<div class="profile-box">
<p><strong>昵称:</strong>{{ $user->name }}</p>
<p><strong>邮箱:</strong>{{ $user->email }}</p>
@if($user->url)<p><strong>主页:</strong><a href="{{ $user->url }}" target="_blank" rel="noopener nofollow">{{ $user->url }}</a></p>@endif
<p><strong>注册时间:</strong>{{ $user->created_at?->format('Y-m-d') }}</p>
<p><strong>登录次数:</strong>{{ $user->logincount }}</p>
<p><strong>角色:</strong>{{ $user->getRoleNames()->implode(', ') ?: '会员' }}</p>
<p><strong>我的文章:</strong>{{ $user->posts()->count() }} 篇</p>
<p><strong>我的评论:</strong>{{ $user->comments()->count() }} 条</p>
@if($user->canAccessAdmin())
<p><a href="{{ url('/admin') }}" target="_blank" rel="noopener">进入后台管理</a></p>
@endif
</div>
<p><a href="{{ route('home') }}">&laquo; 返回首页</a></p>
</main>
@include('partials.sidebar')
</div>
@include('partials.footer')
@stack('theme:body_end')
</body>
</html>