@extends('layout.main')
@section('title') @if( ! empty($title)) {{ $title }} | @endif @parent @endsection

@section('main')
        <div id="wrapper">
            @include('admin.sidebar_menu')

            <div id="page-wrapper">
                @if( ! empty($title))
                    <div class="row">
                        <div class="col-lg-12">
                            <h1 class="page-header"> {{ $title }}  </h1>
                        </div> <!-- /.col-lg-12 -->
                    </div> <!-- /.row -->
                @endif

                @include('admin.flash_msg')

                <div class="row">
                    <div class="col-xs-12">

                        <table class="table table-bordered table-striped" id="jDataTable">
                            <thead>
                                <tr>
                                    <th>@lang('app.name')</th>
                                    <th>@lang('app.email')</th>
                                    <th>@lang('app.message')</th>
                                    <th>@lang('app.created_at')</th>
                                </tr>
                            </thead>
                            
                            
                            @foreach($contact_messages as $message)
                                <tr>
                                    <td>{!! $message->name !!}</td>
                                    <td>{!! $message->email !!}</td>
                                    <td>{!! nl2br($message->message) !!}</td>
                                    <td>{!! $message->created_at_datetime(); !!}</td>
                                </tr>
                               
                            @endforeach
                            
                            
                        </table>

                    </div>
                </div>

            </div>   <!-- /#page-wrapper -->

        </div>   <!-- /#wrapper -->
@endsection