mirror of
https://github.com/dyzulk/santulitam-temp.git
synced 2026-01-26 13:51:55 +07:00
first commit
This commit is contained in:
32
app/Filament/Widgets/StatsOverview.php
Normal file
32
app/Filament/Widgets/StatsOverview.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Widgets;
|
||||
|
||||
use App\Models\Student;
|
||||
use App\Models\Cofasilitator;
|
||||
use Filament\Widgets\StatsOverviewWidget\Stat;
|
||||
use Filament\Widgets\StatsOverviewWidget as BaseWidget;
|
||||
|
||||
class StatsOverview extends BaseWidget
|
||||
{
|
||||
protected function getStats(): array
|
||||
{
|
||||
$mentors = Cofasilitator::count();
|
||||
$students = Student::count();
|
||||
$averageTimeOnPage = '3:12';
|
||||
return [
|
||||
Stat::make('Mentors', $mentors)
|
||||
->icon('heroicon-o-users')
|
||||
->color('success')
|
||||
->description('Last 30 days'),
|
||||
Stat::make('Students', $students)
|
||||
->icon('heroicon-o-user-group')
|
||||
->color('primary')
|
||||
->description('Last 30 days'),
|
||||
Stat::make('Average time on page', '3:12')
|
||||
->icon('heroicon-o-clock')
|
||||
->color('warning')
|
||||
->description('Last 30 days'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user