标签: php laravel laravel-5
拥有Illuminate\Database\Eloquent\Builder类型的对象,如何访问当前所选列的数组?
Illuminate\Database\Eloquent\Builder
答案 0 :(得分:1)
从基本查询构建器获取公共$columns属性:
$columns
$columns = $query->getQuery()->columns;