I would like to modify the existing Authorization module provided by Laravel 5, instead of asking for the email
it will ask for the username
field in the database.
Laravel search the variable $username in the file :
Illuminate\Foundation\Auth\AuthenticatesUsers
public function loginUsername() {
return property_exists($this, 'username') ? $this->username : 'email';
}
As you can see, by default it will be named as 'email'.
However you can override it in your AuthController by adding :
protected $username = 'username';
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With