问答 / 0 / 2 / 创建于 4年前
EloquentModel
get()
toArray()
foreach遍历是否可以保证数据库查询结果的顺序?
肯定可以呀
可以。get() 之后也可以直接通过集合循环处理
$data = $query->get()->map(function ($item) { // do something })
我要举报该,理由是:
肯定可以呀
可以。
get()
之后也可以直接通过集合循环处理