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


Basic Laravel install

So you want to set up a new Laravel Install? Correct? Right ok so lets begin..... First...

2017-06-15

Read More

Back to blogging and a headache

It's a hard thing this day in age to decide what is best to do in terms of technology and how...

2017-05-23

Read More

Twitter