diff --git a/app/Filament/Pages/Dashboard.php b/app/Filament/Pages/Dashboard.php index e5026021..b41e1495 100644 --- a/app/Filament/Pages/Dashboard.php +++ b/app/Filament/Pages/Dashboard.php @@ -2,7 +2,23 @@ namespace App\Filament\Pages; +use Filament\Facades\Filament; +use Illuminate\Support\Facades\Auth; + class Dashboard extends \Filament\Pages\Dashboard { protected static ?string $title = 'Beranda'; -} \ No newline at end of file + + public function getWidgets(): array + { + /** @var User $user */ + $user = Auth::user(); + if ($user->hasRole('Mahasiswa')) { { + return [ + \App\Filament\Widgets\CustomAccountWidget::class, + ]; + } + } + return Filament::getWidgets(); + } +}