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

Simple HTML up

For those of you using such programs as sublime text or Notepadd +++, its rather annoying when yo...


Read More

Adding Boostrap.js to Laravel Project Via Gulp

So while on Twitch, streaming my current Laravel build I came up against something I have never t...


Read More