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

后端 未结 4 1929
暖寄归人
暖寄归人 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:22

    lists() was deprecated. Use pluck() instead.

    The lists method on the Collection, query builder and Eloquent query builder objects has been renamed to pluck. The method signature remains the same.

    https://laravel.com/docs/5.3/upgrade#upgrade-5.3.0

提交回复
热议问题