@lang('activity-log.page.modal', ['id' => $log_id])
@if($detail)
{{ $detail['description'] }}
{{ ucfirst($detail['event']) }} {{ $detail['created_at'] }} @if($detail['changes']) @foreach($detail['changes'] as $field => $value) @php $old = $value['old'] ?? ''; $new = $value['attributes'] ?? @trans('common.log.meta.delete'); if($field == 'role') { $old = App\Helpers\Helper::getRoleName($value['old']); $new = App\Helpers\Helper::getRoleName($value['attributes']); } if($field == 'permissions') { $old = App\Helpers\Helper::getPermissionNameByArray($value['old']); $new = App\Helpers\Helper::getPermissionNameByArray($value['attributes']); } @endphp @endforeach
@lang('activity-log.th.field') @lang('activity-log.th.this') @lang('activity-log.th.that')
{{ ucfirst(str($field)->replace('_', ' ')) }} {!! $old !!} {!! $new !!}
@else @if($detail['created']) @foreach($detail['created']['attributes'] as $field => $value) @if($value) @php if($field == 'role') { $value = App\Helpers\Helper::getRoleName($value); } if($field == 'permissions') { $value = App\Helpers\Helper::getPermissionNameByArray($value); } @endphp @endif @endforeach
@lang('activity-log.th.field') @lang('activity-log.th.this')
{{ ucfirst(str($field)->replace('_', ' ')) }} {!! $field == 'password' ? '**********' : $value !!}
@else
@lang('activity-log.detail.null')
@endif @endif
@endif