FilamentF
Filamentโ€ข2y ago
XODIN

Try to change password name in LOGIN ๐Ÿ˜”

I need to customize my login

And I overwrote my login in a new page , all works fine but the problem its just here ( in the image )

When I try to log in I get an error :
if (! Filament::auth()->attempt([
Undefined array key "password"


but my variable $data has the correct input :
username and password the problem is the filament::auth() which for some reason still has the password field


for more information I changed this :
protected function getForms(): array
{
return [
'form' => $this->form(
$this->makeForm()
->schema([
$this->getUsernameFormComponent(),
$this->getUserpasswordFormComponent(),
$this->getRememberFormComponent(),
])
->statePath('data'),
),
];
}

fit de forms correctly etc...
image.png
Solution
This is not the perfect solution but it is work for me

just use mutators in your Model :

And the rest of the code just use the fields default password and change everything with the default input in filament
image.png
Was this page helpful?