$nodes = Db::table(‘account‘)->orderBy(‘sort‘, ‘asc‘)->orderBy(‘id‘ ,‘asc‘)->get()->map(function ($value) { return (array)$value; })->toArray();
标签:turn array cti ble node 使用 数据库 func UNC
$nodes = Db::table(‘account‘)->orderBy(‘sort‘, ‘asc‘)->orderBy(‘id‘ ,‘asc‘)->get()->map(function ($value) { return (array)$value; })->toArray();
在laravel中,使用DB查询数据库后,返回的对象,可以用下面的办法变为数组
标签:turn array cti ble node 使用 数据库 func UNC
原文地址:https://www.cnblogs.com/M-D-Luffy/p/8591771.html