This commit is contained in:
pushuo 2022-08-09 15:38:39 +08:00
parent 078d93ee24
commit 4b23f93884
2 changed files with 14 additions and 12 deletions

View File

@ -81,6 +81,7 @@ Route::prefix($adminName)
// 单页
Route::middleware('can:pages_index')->get('pages', [Controllers\PagesController::class, 'index'])->name('pages.index');
Route::middleware('can:pages_create')->get('pages/create', [Controllers\PagesController::class, 'create'])->name('pages.create');
Route::middleware('can:pages_show')->get('pages/{code}/edit', [Controllers\PagesController::class, 'edit'])->name('pages.edit');
Route::middleware('can:pages_create')->post('pages', [Controllers\PagesController::class, 'store'])->name('pages.store');
Route::middleware('can:pages_update')->put('pages/{page}', [Controllers\PagesController::class, 'update'])->name('pages.update');
Route::middleware('can:pages_delete')->delete('pages/{page}', [Controllers\PagesController::class, 'destroy'])->name('pages.destroy');

View File

@ -12,26 +12,27 @@
<thead>
<tr>
<th>#</th>
<th>税种</th>
<th>税率</th>
<th>类型</th>
<th>区域</th>
<th>标题</th>
<th>状态</th>
<th>创建时间</th>
<th>修改时间</th>
<th class="text-end">操作</th>
</tr>
</thead>
<tbody>
@foreach ($pages as $page)
<tr>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td class="text-end">1</td>
<td>{{ $page->id }}</td>
<td>{{ $page->description->title }}</td>
<td>{{ $page->active }}</td>
<td>{{ $page->created_at }}</td>
<td>{{ $page->updated_at }}</td>
<td class="text-end">
<a href="{{ admin_route('pages.edit', [$page->id]) }}" class="btn btn-outline-secondary btn-sm">编辑</a>
<a href="{{ admin_route('pages.destroy', [$page->id]) }}" class="btn btn-outline-danger btn-sm">删除</a>
</td>
</tr>
@endforeach
</tbody>
</table>