Graham Morby-Raybould

Designer. Developer. Freelancer.

Laravel Username Login 5.3

Laravel Username Login 5.3

So as many of you know using Laravels built in Auth can set up user logins in seconds. But with the out of the box solution giving you Email and Password options, it can be a little long winded for some wanting to use a simple username.

To make it easier on users and admins to just add a 'Username' to your Auth database.  Then a Username() method to the Auth Controller:

public function username()
    return 'username';

Just pop over and edit your login view and you're done! Username and Password logins are sorted!

Created: 2017-11-14.

Recent posts

OFF TOPIC - The last Cassini image is something so beautiful

We live in a world where technology rules, a world where we cant seem to cross the road with out...


Read More

Have you tried turning it off and on again

It would seem its a common thing this day in age. As a developer I have a certain amount of compu...


Read More