Support the ongoing development of Laravel.io →
Authentication

I took the painful steps to alter the [php artisan make:auth] authentication/registration scaffolding by altering the User model. In a nutshell, I renamed the User model to AccountLogin because I already have a Users table (which holds an email address). I also modified the model to authenticated using a username vs. email.

The registration/login work great. However, when I attempt to reset my password I receive an error that my AccountLogin model doesn't have an email column (which is accurate because it's in another table). I tried altering the AccountLogin model using a public function getEmailAttribute() but the scaffolding doesn't call the Model->email attribute.

Last updated 3 years ago.
0

You do know that the artisan command will be restored the moment you do composer update?

Didn't I advise you against altering this method a few days ago?

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.