@extends('layouts.app') @section('content')

{{ app()->getLocale() == 'ar' ? 'سجل النشاطات' : 'Activity Logs' }}

@foreach($logs as $log) @endforeach
{{ app()->getLocale() == 'ar' ? 'المستخدم' : 'User' }} {{ app()->getLocale() == 'ar' ? 'الموديول' : 'Module' }} {{ app()->getLocale() == 'ar' ? 'العملية' : 'Action' }} {{ app()->getLocale() == 'ar' ? 'رقم السجل' : 'Record ID' }} {{ app()->getLocale() == 'ar' ? 'التاريخ' : 'Date' }} IP {{ app()->getLocale() == 'ar' ? 'البيانات' : 'Data' }}
{{ $log->user->name ?? (app()->getLocale() == 'ar' ? 'النظام' : 'System') }} {{ $log->module }} @if($log->action === 'created') {{ app()->getLocale() == 'ar' ? 'إضافة' : 'Created' }} @elseif($log->action === 'updated') {{ app()->getLocale() == 'ar' ? 'تعديل' : 'Updated' }} @else {{ app()->getLocale() == 'ar' ? 'حذف' : 'Deleted' }} @endif #{{ $log->record_id }}
{{ $log->created_at->format('Y-m-d') }} {{ $log->created_at->format('H:i:s') }}
{{ $log->ip_address }} @if($log->new_data)
{{ app()->getLocale() == 'ar' ? 'عرض البيانات' : 'View Data' }}
{{ json_encode($log->new_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}
@endif
@if($logs->hasPages())
{{ $logs->links() }}
@endif
@endsection