diff --git a/resources/views/pages/list-activities.blade.php b/resources/views/pages/list-activities.blade.php index df3d84e..5841773 100644 --- a/resources/views/pages/list-activities.blade.php +++ b/resources/views/pages/list-activities.blade.php @@ -10,7 +10,7 @@ $changes = $activityItem->getChangesAttribute(); $changesCount = $changes->count(); @endphp - +
@if($changesCount > 0) - - - - - @lang('filament-activity-log::activities.table.field') - - - @lang('filament-activity-log::activities.table.old') - - - @lang('filament-activity-log::activities.table.new') - - - @php - /* @var \Spatie\Activitylog\Models\Activity $activityItem */ - $changes = $activityItem->getChangesAttribute(); - @endphp - @foreach(data_get($changes, 'attributes', []) as $field => $change) - @php - $oldValue = data_get($changes, "old.{$field}"); - $newValue = data_get($changes, "attributes.{$field}"); - @endphp - $loop->even])> - - {{ $this->getFieldLabel($field) }} - - - @if(is_array($oldValue)) -
{{ json_encode($oldValue, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
- @else - {{ $oldValue }} - @endif -
- - @if(is_array($newValue)) -
{{ json_encode($newValue, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
- @else - {{ $newValue }} - @endif -
-
- @endforeach -
+ + + + @lang('filament-activity-log::activities.table.field') + + + @lang('filament-activity-log::activities.table.old') + + + @lang('filament-activity-log::activities.table.new') + + + @foreach(data_get($changes, 'attributes', []) as $field => $change) + @php + $oldValue = data_get($changes, "old.{$field}"); + $newValue = data_get($changes, "attributes.{$field}"); + @endphp + $loop->even])> + + {{ $this->getFieldLabel($field) }} + + + @if(is_array($oldValue)) +
{{ json_encode($oldValue, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
+ @else + {{ $oldValue }} + @endif +
+ + @if(is_array($newValue)) +
{{ json_encode($newValue, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
+ @else + {{ $newValue }} + @endif +
+
+ @endforeach +
@endif
@endforeach