mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
add filament dashboard
This commit is contained in:
26
app/Filament/Widgets/UserStat.php
Normal file
26
app/Filament/Widgets/UserStat.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Filament\Custom\Widgets\StatTable;
|
||||
use App\Repositories\DashboardRepository;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Nexus\Database\NexusDB;
|
||||
|
||||
class UserStat extends StatTable
|
||||
{
|
||||
protected static ?int $sort = 100;
|
||||
|
||||
protected function getHeader(): string
|
||||
{
|
||||
return nexus_trans('dashboard.user.page_title');
|
||||
}
|
||||
|
||||
protected function getTableRows(): array
|
||||
{
|
||||
$dashboardRep = new DashboardRepository();
|
||||
|
||||
return $dashboardRep->statUsers();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user