transformDatatables($array, $total); } public function transformCustomField (CustomField $field) { $array = [ 'name' => $field->name, 'db_column_name' => $field->db_column_name(), 'format' => $field->format, 'required' => $field->pivot->required ]; return $array; } }