@extends('admin.layouts.app')
@section('content')
<div class="row">
    <div class="col-12">
        <div class="card">
            <div class="card-body">
                @include('admin.partial.list-filter', ['filterRoute' => 'suggestions.index'])
                <div id="datatable_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
                    <div class="row">
                        <div class="col-sm-12">
                            <table id="datatable" class="table table-bordered dt-responsive nowrap dataTable no-footer dtr-inline" style="border-collapse: collapse; border-spacing: 0px; width: 100%;" role="grid" aria-describedby="datatable_info">
                                <thead>
                                    <tr role="row">
                                        <th>شماره موبایل کاربر</th>
                                        <th>متن</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @foreach ($suggestions as $suggestion)
                                    <tr>
                                        <td>{{ $suggestion->user->mobile }}</td>
                                        <td>{{ $suggestion->text }}</td>
                                    </tr>
                                    @endforeach
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="d-flex justify-content-center mt-3">
                        {{ $suggestions->withQueryString()->links() }}
                    </div>
                </div>

            </div>

        </div>
    </div>
</div>
@endsection