This function is responsible of defining the username in laravel 5.1 authentication:
public function loginUsername()
{
return property_exists($this, 'username') ? $this->username : 'email';
}
if I modify it to
public function loginUsername()
{
return property_exists($this, 'username') ? $this->username : 'username';
}
in the foundation file (and adapt my views and db) will this persist in the event of an update? and if not how do I override it and leave the foundation file alone? I already made a new controller for registering user and I am calling it in my route instead of the default one, however I am finding difficult to do the same with the postlogin route.
Instead of modifying that in
AuthenticatesUserstrait, you just have to add a property on yourAuthController:protected $username = 'username';