record.blade.php 1.88 KB
@extends('layouts.backend.index')
@section('content')
<div class="panel-container show">
    <div class="panel-content">
        <table class="table" >
            <thead class="thead-dark">
                <tr>
                    <th scope="col">Model</th>
                    <th scope="col">Model ID</th>
                    <th scope="col">Action</th>
                    <th scope="col">Username</th>
                    <th scope="col">Time</th>
                    <th scope="col">Old Values</th>
                    <th scope="col">New Values</th>
                </tr>
            </thead>
            <tbody id="audits">
            @foreach($audits as $audit)
                <tr>
                    <td>{{ $audit->auditable_type }}</td>
                    <td>{{ $audit->auditable_id }}</td>
                    <td>{{ $audit->event }}</td>
                    <td>{{ $audit->user->username }}</td>
                    <td>{{ $audit->created_at }}</td>
                    <td>
                        <table class="table">
                        @foreach($audit->old_values as $attribute => $value)
                            <tr>
                                <td><b>{{ $attribute }}</b></td>
                                <td>{{ $value }}</td>
                            </tr>
                        @endforeach
                        </table>
                    </td>
                    <td>
                        <table class="table">
                        @foreach($audit->new_values as $attribute => $value)
                        <tr>
                            <td><b>{{ $attribute }}</b></td>
                            <td>{{ $value }}</td>
                        </tr>
                        @endforeach
                        </table>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
    </div>
</div>
@endsection