add filament dashboard

This commit is contained in:
xiaomlove
2022-06-28 13:33:18 +08:00
parent bccea81e44
commit 6fb3d95ef0
17 changed files with 229 additions and 16 deletions

View File

@@ -46,6 +46,7 @@ return [
'os' => 'OS',
'server_software' => 'Web software',
'load_average' => 'Server load average',
'filament_version' => 'Filament version',
],
'latest_user' => [
'page_title' => 'User latest',

View File

@@ -46,6 +46,7 @@ return [
'os' => '操作系统',
'server_software' => 'Web 软件',
'load_average' => '服务器平均负载',
'filament_version' => 'Filament 版本',
],
'latest_user' => [
'page_title' => '最新用户',

View File

@@ -46,6 +46,7 @@ return [
'os' => '操作系統',
'server_software' => 'Web 軟件',
'load_average' => '服務器平均負載',
'filament_version' => 'Filament 版本',
],
'latest_user' => [
'page_title' => '最新用戶',

View File

@@ -0,0 +1,3 @@
<x-filament::page>
</x-filament::page>

View File

@@ -0,0 +1,40 @@
<x-filament::widget>
<x-filament::card>
<div class="p-2 space-y-2 bg-white rounded-xl shadow">
<div class="space-y-2">
<div class="px-4 py-2 space-y-4">
<div class="flex items-center justify-between gap-8">
<h2 class="text-xl font-semibold tracking-tight filament-card-heading">
{{$header}}
</h2>
</div>
<div aria-hidden="true" class="border-t filament-hr"></div>
<div>
<table class="w-full text-left rtl:text-right divide-y table-auto filament-tables-table">
<tbody class="divide-y whitespace-nowrap">
@foreach(array_chunk($data, 2) as $chunk)
<tr class="filament-tables-row">
@foreach($chunk as $item)
<th class="filament-tables-cell"><div class="px-4 py-3 filament-tables-text-column">{{$item['text']}}</div></th>
<td class="filament-tables-cell"
@if($loop->count == 1)
colspan="3"
@endif
>
<div class="px-4 py-3 filament-tables-text-column">{{$item['value']}}</div>
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</x-filament::card>
</x-filament::widget>