From d4d5836282e06918993b5ba9f9db9937035a2c7a Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Thu, 6 Jun 2024 13:14:25 -0400 Subject: [PATCH] added filament user profile --- app/Filament/Resources/UserResource.php | 1 + app/Providers/Filament/AdminPanelProvider.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index 3544c76b3..973f86239 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -74,6 +74,7 @@ public static function form(Form $form): Form ->schema([ Forms\Components\Select::make('role') ->options(UserRole::class) + ->default(UserRole::User) ->disabled(fn (): bool => ! Auth::user()->is_admin) ->required(), ]) diff --git a/app/Providers/Filament/AdminPanelProvider.php b/app/Providers/Filament/AdminPanelProvider.php index e7b3d3927..6b8647b97 100644 --- a/app/Providers/Filament/AdminPanelProvider.php +++ b/app/Providers/Filament/AdminPanelProvider.php @@ -30,6 +30,7 @@ public function panel(Panel $panel): Panel ->id('admin') ->path('admin') ->login() + ->profile(isSimple: false) ->colors([ 'primary' => Color::Amber, ])