lists() method not found
时间:2017-10-24 13:52:36
收藏:0
阅读:240
报错信息
BadMethodCallException with message ‘Call to undefined method App\User::lists()‘
laravel以前的版本用lists方法,而5.3版本开始则弃了这个方法,改用pluck方法,用法一致。
$ids = \App\User::lists(‘id‘); // 改为 $ids = \App\User::pluck(‘id‘);
原文:http://www.cnblogs.com/jialongfei/p/7723016.html
评论(0)