Laravel sessions regenerating on every load

后端 未结 8 2297
盖世英雄少女心
盖世英雄少女心 2021-02-18 19:05

I\'m having a lot of problems and I really can\'t seem to find a solution.

Yesterday, I finished up doing some work on a vagrant box in Laravel. When I shut down the com

8条回答
  •  猫巷女王i
    2021-02-18 19:46

    There are many reasons this can happen, I just ran into this problem myself. The fix for me was to change:

    public function getAuthIdentifier()
    {
        return $this->username;
    }
    

    to

    public function getAuthIdentifier()
    {
        return $this->getKey();
    }
    

    on the User model.

提交回复
热议问题