Call to undefined method Illuminate\Database\Query\Builder::lists() when seeding after updating to Laravel 5.3

后端 未结 4 1930
暖寄归人
暖寄归人 2020-12-09 14:52

I\'m updating to laravel 5.3, and I get this message:

[2016-08-23 23:12:39] local.ERROR: BadMethodCallException: Call to undefined method Illuminate\\Databas         


        
4条回答
  •  情书的邮戳
    2020-12-09 15:19

    Laravel 5.3, the lists() method is removed in favour of the pluck() method. For Example:

    $userList = App\User::pluck('name', 'id');
    

提交回复
热议问题