|
{{ ($activities->perPage() * ($activities->currentPage() - 1)) + $loop->iteration }}
|
{{ $activity->created_at?->format('Y-m-d') ?? '-' }} |
{{ $activity->created_at?->format('H:i') ?? '-' }} |
{{ $activity->causer?->name ?? __('messages.system') }} |
$activity->event === 'created',
'bg-warning/10 text-warning' => $activity->event === 'updated',
'bg-danger/10 text-danger' => $activity->event === 'deleted',
'bg-muted text-muted-foreground' => ! in_array($activity->event, ['created', 'updated', 'deleted'], true),
])
>
{{ $activity->event ?? '-' }}
|
{{ $activity->description }} |
@php($oldValues = $activity->properties['old'] ?? [])
@php($newValues = $activity->properties['attributes'] ?? [])
@if ($activity->event === 'updated' && $oldValues !== [])
{{ __('messages.change_details') }}
| {{ __('messages.field') }} |
{{ __('messages.previous_value') }} |
{{ __('messages.new_value') }} |
@foreach ($oldValues as $key => $value)
| {{ $key }} |
{{ is_scalar($value) ? $value : json_encode($value, JSON_UNESCAPED_UNICODE) }} |
{{ array_key_exists($key, $newValues) ? (is_scalar($newValues[$key]) ? $newValues[$key] : json_encode($newValues[$key], JSON_UNESCAPED_UNICODE)) : '-' }}
|
@endforeach
@else
{{ __('messages.no_changes') }}
@endif
|
@empty