更新时间:2023-12-01 08:55:28
OP的答案.
删除代码protected $primaryKey = 'login'
和getAuthIdentifierName()
方法.
您要做的就是在控制器中重写(添加)username()
方法.
All you have to do is override (add) username()
method in the controller.
有关迁移及其正确操作的说明:
Note for migrations and how to do it right:
down()
方法不那么在意down()
method that much创作者&的一些材料您可以在此播客 http://www上收听Laravel的有关迁移的朋友.laravelpodcast.com/episodes/68236-episode-53-bigger-better 大约30分钟.
Some material from creator & friends of Laravel regarding migrations can be heard in this podcast http://www.laravelpodcast.com/episodes/68236-episode-53-bigger-better around 30 minute mark.