laravel - 方法列表不存在

标签 laravel laravel-5.3

enter image description here我正在尝试使用这种方法从数据库填充我的选择框

{!! Form::select('worktypes', $worktypes->lists('name'), null, ['class' => 'col-md-2 form-control', 'required', 'placeholder' => '--auswählen']) !!}

但是Laravel 5.3中不再存在方法list()

还有其他方法吗?

最佳答案

我刚发现:

方法 lists() 在 Laravel v5.2 中已弃用^

它更名为:

pluck()

方法签名保持不变。

Laravel Documentation

在该链接上搜索 Deprecations

关于laravel - 方法列表不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40280363/

相关文章:

Laravel - 使用从中间件组返回的值作为全局变量

laravel - 无法打开流 : No such file or directory (Laravel)

javascript - 如何在 vue.js 2 上循环模板标签?

php - Laravel服务到IOS App的算法设计

php - 拉维 5.4 : sending email from localhost not working

php - 如何在ajax URL路由中添加变量

php - 包含模型到数组的 Laravel 集合

php - Laravel 5.2 和 Valet - 无法发送电子邮件 - 无法找到套接字传输 "plain"

php - Laravel:如何优化多个查询

Laravel:删除数据透视表中的行的最佳方法是什么?