From bc2df22d78e2aca5a44966b4f3656956ad87a61c Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 28 Oct 2024 18:23:29 -0400 Subject: [PATCH] Add unique (#685) Usernames have to be unique, trying to make a new user with an existing username results in a 500, this fixes it. --- app/Filament/Resources/UserResource/Pages/ListUsers.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Filament/Resources/UserResource/Pages/ListUsers.php b/app/Filament/Resources/UserResource/Pages/ListUsers.php index 5105302369..81939cc078 100644 --- a/app/Filament/Resources/UserResource/Pages/ListUsers.php +++ b/app/Filament/Resources/UserResource/Pages/ListUsers.php @@ -91,6 +91,7 @@ protected function getHeaderActions(): array TextInput::make('username') ->alphaNum() ->required() + ->unique() ->maxLength(255), TextInput::make('email') ->email()