初始化

This commit is contained in:
2026-08-08 18:27:38 +08:00
parent efc150c937
commit 060eb79c09
336 changed files with 24613 additions and 15 deletions
@@ -0,0 +1,30 @@
@extends('admin.layout')
@section('title', '留言管理')
@section('page-title', '留言管理')
@section('content')
<table class="data-table">
<thead><tr><th>姓名</th><th>邮箱</th><th>主题</th><th>时间</th><th class="col-op">操作</th></tr></thead>
<tbody>
@forelse ($messages as $m)
<tr>
<td>{{ $m->name }}</td>
<td>{{ $m->email }}</td>
<td>{{ $m->subject }}</td>
<td class="muted">{{ $m->created_at->format('Y-m-d') }}</td>
<td class="row-actions">
<a href="{{ route('admin.contacts.show', $m) }}" class="btn btn-sm"><x-icon name="edit" :size="16"/></a>
<form method="POST" action="{{ route('admin.contacts.destroy', $m) }}" onsubmit="return confirm('确认删除该留言?')">
@csrf @method('DELETE')
<button class="btn btn-sm btn-danger"><x-icon name="trash" :size="16"/></button>
</form>
</td>
</tr>
@empty
<tr><td colspan="5" class="muted">暂无留言。</td></tr>
@endforelse
</tbody>
</table>
{{ $messages->links('pagination::bootstrap-5') }}
@endsection
@@ -0,0 +1,24 @@
@extends('admin.layout')
@section('title', '留言详情')
@section('page-title', '留言详情')
@section('actions')
<a href="{{ route('admin.contacts.index') }}" class="btn btn-sm"> 返回列表</a>
@endsection
@section('content')
<div class="card">
<p><strong>姓名:</strong>{{ $contactMessage->name }}</p>
<p><strong>邮箱:</strong>{{ $contactMessage->email }}</p>
<p><strong>电话:</strong>{{ $contactMessage->phone ?: '-' }}</p>
<p><strong>主题:</strong>{{ $contactMessage->subject }}</p>
<p><strong>时间:</strong>{{ $contactMessage->created_at->format('Y-m-d H:i') }}</p>
<hr>
<p class="prose">{{ nl2br(e($contactMessage->message)) }}</p>
</div>
<form method="POST" action="{{ route('admin.contacts.destroy', $contactMessage) }}" onsubmit="return confirm('确认删除该留言?')">
@csrf @method('DELETE')
<button class="btn btn-danger">删除留言</button>
</form>
@endsection