$import->id, 'file_path' => $import->file_path, 'filesize' => Setting::fileSizeConvert($import->filesize), 'name' => $import->name, 'import_type' => $import->import_type, 'created_at' => $import->created_at->diffForHumans(), 'header_row' => $import->header_row, 'first_row' => $import->first_row, 'field_map' => $import->field_map, ]; return $array; } public function transformImportsDatatable($imports) { return (new DatatablesTransformer)->transformDatatables($imports); } }