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

Security Center

{{-- Current Session --}}

Current Session

Device

{{ $currentSession->device ?? 'Unknown Device' }}

IP Address

{{ $currentSession->ip_address ?? 'N/A' }}

Last Active

{{ $currentSession->last_active ?? 'Now' }}

{{-- Login History --}}

Login History

@forelse($loginHistory ?? [] as $login) @empty @endforelse
Date IP Address Device Status Browser
{{ $login->created_at->format('M d, Y h:i A') }} {{ $login->ip_address }} {{ $login->device }} {{ ucfirst($login->status) }} {{ $login->browser ?? '---' }}
No login history
{{-- Security Events --}} @if(isset($securityEvents) && $securityEvents->count())

Security Events

@foreach($securityEvents as $event)
{{ str_replace('_', ' ', ucfirst($event->type)) }} {{ $event->description }}
{{ $event->created_at->diffForHumans() }}
@endforeach
@endif
{{-- Change Login PIN --}}

Change Login PIN

@csrf @method('POST')
@error('current_pin')

{{ $message }}

@enderror
@error('new_pin')

{{ $message }}

@enderror
{{-- Change Transaction PIN --}}

Change Transaction PIN

@csrf @method('POST')
@error('current_pin')

{{ $message }}

@enderror
@error('new_pin')

{{ $message }}

@enderror
{{-- Active Devices --}}

Active Devices

@csrf @method('POST')
@forelse($activeDevices ?? [] as $device)
@if(strpos($device->device, 'iPhone') !== false || strpos($device->device, 'Android') !== false) @else @endif

{{ $device->device }}

{{ $device->ip_address }} · {{ $device->last_active->diffForHumans() }}

@if(!($device->is_current ?? false))
@csrf @method('DELETE')
@else Current @endif
@empty

No active devices

@endforelse
@endsection