@forelse ($logs as $log)
@php
$action = strtolower($log->action ?? '');
$actionClass = match ($action) {
'create', 'created' => 'success',
'update', 'updated' => 'warning',
'delete', 'deleted' => 'danger',
default => 'secondary',
};
@endphp
{{ $log->user ? trim($log->user->name . ' ' . $log->user->last_name) : 'Sistema' }}
{{ optional($log->created_at)->format('Y-m-d H:i') }}
{{ ucfirst($action) }}
Modelo
{{ $modelLabels[$log->model] ?? $log->model }}
Razón
{{ $log->reason ?? 'Sin especificar' }}
@if ($log->before)
@endif
@if ($log->after)
@endif
@if (!$log->before && !$log->after)
Sin cambios registrados
@endif
@empty
inbox No hay registros.
@endforelse
| Fecha |
Usuario |
Acción |
Modelo |
Razón |
Antes |
Después |
@forelse ($logs as $log)
@php
$action = strtolower($log->action ?? '');
$actionClass = match ($action) {
'create', 'created' => 'success',
'update', 'updated' => 'warning',
'delete', 'deleted' => 'danger',
default => 'secondary',
};
@endphp
| {{ optional($log->created_at)->format('Y-m-d H:i') }} |
{{ $log->user ? trim($log->user->name . ' ' . $log->user->last_name) : 'Sistema' }}
|
{{ ucfirst($action) }} |
{{ $modelLabels[$log->model] ?? $log->model }} |
{{ $log->reason ?? 'Sin especificar' }} |
@if ($log->before)
@else
N/A
@endif
|
@if ($log->after)
@else
N/A
@endif
|
@empty
|
inbox No hay registros.
|
@endforelse
@if ($logs->hasPages())
@endif