{{-- Extends layout --}}
@extends('layout.default')
{{-- Content --}}
@section('content')

<div class="card card-custom">
    <div class="card-header flex-wrap border-0 pt-6 pb-0">
        <div class="card-title">
            <h3 class="card-label">All Messages
            </h3>
        </div>
        <div class="card-toolbar">
        </div>
    </div>
    <div class="card-body">
        <table class="table table-bordered table-hover" id="batch1">
            <thead>
                <tr>
                    <th>Date</th>
                    <th>Sender</th>
                    <th>Instructor</th>
                    <th>Student</th>
                    <th>Message</th>
                </tr>
            </thead>
            <tbody>
                @foreach ($batches as $row)
                <tr>
                    <td><span class="text-dark-75 font-weight-bolder d-block font-size-lg">{{ $row ->messagedate }}</span></td>
                    <td>{{ $row ->sender }}</td>
                    <td>{{ $row ->FirstName }}</td>
                    <td>{{ $row ->participant_name }}</td>
                    <td>{!! $row ->message !!}</td>
                </tr>
                @endforeach
            </tbody>
        </table>
    </div>
</div>
@endsection
{{-- Styles Section --}}
@section('styles')
<link href="{{ asset('plugins/custom/datatables/datatables.bundle.css') }}" rel="stylesheet" type="text/css" />
@endsection
{{-- Scripts Section --}}
@section('scripts')
{{-- vendors --}}
<script src="{{ asset('plugins/custom/datatables/datatables.bundle.js') }}" type="text/javascript"></script>

{{-- page scripts --}}
<script type="text/javascript">
    var table = $('#batch1').DataTable({
        responsive: true,
        // Pagination settings
        dom: `<'row'<'col-sm-6 text-left'f><'col-sm-6 text-right'B>>
			<'row'<'col-sm-12'tr>>
			<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7 dataTables_pager'lp>>`,

        buttons: [
            'print',
            'excelHtml5'
        ],
    });
</script>

<script src="{{ asset('js/app.js') }}" type="text/javascript"></script>
@endsection