@extends('layouts.main')
@section('title', 'Acessos')

@section('content')
<div class="container">
    <a href="{{ route('ADM') }}" class="btn btn-primary mb-3">← Voltar para o Dashboard</a>
</div>
<div class="container mt-4">
    <h2>Logs de Acesso</h2>
    <table class="table table-bordered table-striped mt-3">
        <thead class="thead-dark">
            <tr>
                <th>IP</th>
                <th>Usuário</th>
                <th>Ação</th>
                <th>Data/Hora</th>
            </tr>
        </thead>
        <tbody>
            @foreach($logs as $log)
                <tr>
                    <td>{{ $log->ip }}</td>
                    <td>{{ $log->usuario }}</td>
                    <td>{{ $log->acao }}</td>
                    <td>{{ $log->data_hora }}</td>
                </tr>
            @endforeach
        </tbody>
    </table>
</div>
@endsection
