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.

So to make it easier on users and admin's 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 your done! Username and Password logins are sorted!


Created: 2016-12-26.


Recent posts


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 t...

2016-12-26

Read More

Sir Mixin alot

So I have not written here for an age! I have been so busy with work and retraining as a PHP deve...

2016-12-20

Read More

Twitter