public function export(Model $m, $fields = null) { $export = $this->action($m, 'select', [$fields]); return array_map(function ($r) use($m) { return $this->typecastLoadRow($m, $r); }, $export->get()); }