@extends('layouts.admin')
@section('content')
<div class="container">
    <div class="row">
        <div class="col-12">
            <div class="bg-primary p-3">
                <h4 class="m-0 text-white">Website Forms</h4>
            </div>
            <div class="my-2">Showing <b>{{ $records->firstItem() }}</b> to <b>{{ $records->lastItem() }}</b> of total <b>{{$records->total()}}</b> records</div>
            <div class="table-responsive">
                <table class="table table-sm table-bordered table-striped">
                    <thead>
                        <tr>
                            <th>Date</th>
                            <th>IID</th>
                            <th>Form Name</th>
                            <th>IP Address</th>
                            <th>Device Type</th>
                            <th>Form Data</th>
                        </tr>
                    </thead>
                    <tbody>
                        @foreach($records as $record)
                        <tr>
                            <td>{{ $record->created_at }}</td>
                            <td>{{ $record->iid }}</td>
                            <td>{{ $record->form_name }}</td>
                            <td>{{ $record->ip_address }}</td>
                            <td>{{ $record->device_type }}</td>
                            <td>{{ $record->form_data }}</td>
                        </tr>
                        @endforeach
                    </tbody>
                </table>
            </div>
            <div>
                {{ $records->appends(request()->input())->links() }}
            </div>
        </div>
    </div>
</div>
@endsection
