该函数负责定义 laravel 5.1 认证中的用户名:
public function loginUsername()
{
return property_exists($this, 'username') ? $this->username : 'email';
}
如果我将其修改为
public function loginUsername()
{
return property_exists($this, 'username') ? $this->username : 'username';
}
在基础文件(并调整我的视图和数据库)中,这会在更新时持续存在吗?如果不是,我该如何覆盖它并单独保留基础文件?我已经为注册用户制作了一个新控制器,并且在我的路由中调用它而不是默认的,但是我发现很难对 postlogin 路由执行相同的操作。