<?php $__env->startSection('content'); ?>
    <div class="box">
        <div class="box-body">
            <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
                <div class="row">
                    <div class="col-sm-6"></div>
                    <div class="col-sm-6"></div>
                </div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 col-lg-12 col-xs-12">
                        <table class="table table-bordered table-hover" id="images-table">
                            <thead>
                            <tr>
                                <th>Id</th>
                                <th>Title</th>
                                <th>Created By</th>
                                <th>Views</th>
                                <th>Transaction ID</th>
                                <th>Approved At</th>
                                <th>Created At</th>
                                <th>Expire At</th>
                                <th>Updated At</th>
                                <th>Actions</th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-7">
                        <div class="dataTables_paginate paging_simple_numbers" id="example2_paginate"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('extra-js'); ?>
    <script>
        $(function() {
            $('#images-table').DataTable({
                processing: true,
                serverSide: true,
                responsive: true,
                autoWidth: false,
                ajax: '<?php echo route('admin.posts.data', ['type' => $type]); ?>',
                columns: [
                    { data: 'id', name: 'posts.id'},
                    { data: 'title', name: 'posts.title' },
                    { data: 'fullname', name: 'fullname', },
                    { data: 'views', name: 'views'},
                    { data: 'transaction_id', name: 'posts.transaction_id'},
                    { data: 'approved_at', name: 'posts.approved_at' },
                    { data: 'created_at', name: 'posts.created_at' },
                    { data: 'expire_at', name: 'posts.expire_at' },
                    { data: 'updated_at', name: 'posts.updated_at' },
                    { data: 'actions', name: 'actions', orderable: false, searchable: false },
                ],
                "fnInitComplete": function () {
                    imageApprove();
                    imageDisapprove();
                }
            });
        });
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master.index', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>