@section('title') | {{ __('app.team_logbook') }} @endsection
{{-- card header --}}
{{ __('app.team_logbook') }} @if ($this->activities->count() > 0) @endif
{{-- card body --}}
@if ($this->activities->count() > 0) {{-- Pagination controls at top --}}
{{ $this->activities->links() }}
@foreach ($this->activities as $log)
{{ $log['description'] }}
@if ($log['event'] === 'UPDATED' or $log['event'] === 'DELETED') {{-- old values --}} @php $headers = [['index' => 'key', 'label' => 'Key'], ['index' => 'value', 'label' => __('app.old')]]; $rows = collect($log['properties_old']) ->map(function ($value, $key) { return [ 'key' => $key, 'value' => $value, ]; }) ->toArray(); @endphp {{-- new values --}} @php $headers = [['index' => 'key', 'label' => 'Key'], ['index' => 'value', 'label' => __('app.new')]]; $rows = collect($log['properties_new']) ->map(function ($value, $key) { return [ 'key' => $key, 'value' => $value, ]; }) ->toArray(); @endphp @else {{-- values --}} @php $headers = [['index' => 'key', 'label' => 'Key'], ['index' => 'value', 'label' => __('app.value')]]; $rows = collect($log['properties']) ->map(function ($value, $key) { return [ 'key' => $key, 'value' => $value, ]; }) ->toArray(); @endphp @endif
{{ $log['event'] }} {{ $log['updated_at'] }} @if ($log['causer']) by {{ $log['causer'] }} @endif
@endforeach
{{-- Pagination controls at bottom --}}
{{ $this->activities->links() }}
@else
@endif