Can't log in after converting user to have first_name and last_name

Hi. This is going to be really simple. I have done this before, but I can't for the life of me figure out what I have missed. I spun up a fresh Laravel project, installed Filament, and could log in. I then amended the migration to have first_name and last_name and using UUIDS. Then amended the User model and added HasName and the function
public function getFilamentName(): string
{
return "{$this->first_name} {$this->last_name}";
}
public function getFilamentName(): string
{
return "{$this->first_name} {$this->last_name}";
}
When I try to log in, it just loops back to the login form.
Solution:
If I remember correctly the sessions table migration uses foreignId instead of foreignUuid
Jump to solution
4 Replies
MikePageDev
MikePageDevOP3w ago
Is there anyone around who could help with these issues?
awcodes
awcodes3w ago
Did you add the HasUuid trait to your model too? Might need to adjust the laravel tables too to reference the user by uuid too.
Solution
awcodes
awcodes3w ago
If I remember correctly the sessions table migration uses foreignId instead of foreignUuid
MikePageDev
MikePageDevOP3w ago
I know it was going to be simple. I thought I had changed all to UUID but missed the session table. Thanks

Did you find this page helpful?