Hi there.
I find this plugin very useful for quickly viewing the data handled by the laravel-auditing package. However, I have tried to modify the presentation of the old and new values, as indicated in the documentation, using the formatAuditFieldsForPresentation method, but I have not been successful, as it appears that the method is not being called.
Looking into the code a little, I see that in AuditsRelationManager:
AuditValuesColumn::make('old_values')
->formatStateUsing(fn (Column $column, Model $record, $state) => $this->formatData($record, name: $column->getName(), state: $column->getState()))
->label(trans('filament-auditing::filament-auditing.column.old_values')),
The modification is made using formatStateUsing, which is ‘supposed’ to call formatData, which in turn calls formatAuditFieldsForPresentation. However, formatStateUsing is not called initially, preventing the view change from occurring.
Versions
Laravel Version: v12.25.0
Filament Version: 4.0.3
Plugin Version: 4.0.5
owen-it/Laravel-auditing: 14.0
Hi there.
I find this plugin very useful for quickly viewing the data handled by the laravel-auditing package. However, I have tried to modify the presentation of the old and new values, as indicated in the documentation, using the formatAuditFieldsForPresentation method, but I have not been successful, as it appears that the method is not being called.
Looking into the code a little, I see that in
AuditsRelationManager:The modification is made using
formatStateUsing, which is ‘supposed’ to callformatData, which in turn callsformatAuditFieldsForPresentation. However, formatStateUsing is not called initially, preventing the view change from occurring.Versions
Laravel Version: v12.25.0
Filament Version: 4.0.3
Plugin Version: 4.0.5
owen-it/Laravel-auditing: 14.0