@extends('tyro-dashboard::layouts.admin') @section('title', 'Audit Logs') @section('breadcrumb') Dashboard / Audit Logs @endsection @section('content')
@if(!empty($filters['search']) || !empty($filters['event']) || !empty($filters['actor']) || !empty($filters['from']) || !empty($filters['to'])) Clear @endif
@if($logs->count())
@csrf
@foreach($logs as $log) @endforeach
Time Event Actor Target Summary Actions
{{ optional($log->created_at)->format('Y-m-d H:i:s') }} {{ $log->event }} @if($log->user) @else System @endif @php $targetType = class_basename($log->auditable_type ?? 'System'); $targetId = $log->auditable_id; $targetRoute = null; if ($targetId) { if ($targetType === 'User') { $targetRoute = route($dashboardRoute::name('users.edit'), $targetId); } elseif ($targetType === 'Role') { $targetRoute = route($dashboardRoute::name('roles.show'), $targetId); } elseif ($targetType === 'Privilege') { $targetRoute = route($dashboardRoute::name('privileges.show'), $targetId); } } @endphp @if($targetRoute) {{ $targetType }} #{{ $targetId }} @else {{ $targetType }} @if($targetId) #{{ $targetId }} @endif @endif {{ \Illuminate\Support\Str::limit($log->summary, 100) }}
@csrf @method('DELETE')
@if($logs->hasPages()) @endif @else

No audit logs found

No entries match your current filters.

@endif
@push('scripts') @endpush @endsection