<?php $__env->startSection('title'); ?>
Marcas
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content-header'); ?>
Marcas
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
<li class="active">
    Marcas
</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-xs-12">
        <div class="box no-border">
            <div class="box-header">
                <h3 class="box-title">Lista de Marcas</h3>
                <div class="box-tools pull-right">
                    <a href="<?php echo route('admin.brands.create'); ?>" class="btn btn-success btn-sm"><i class="fa fa-plus"></i> Nova Marca</a>
                </div>
            </div>
            <div class="box-body">
                <table id="table-brands" class="table table-bordered table-striped dataTable">
                    <thead>
                        <tr>
                            <th class="width-1">ID</th>
                            <th></th>
                            <th>Nome</th>
                            <th>Descrição</th>
                            <th class="width-1">Produtos</th>
                            <th class="width-120px">Data Criação</th>
                            <th class="width-40px"></th>
                        </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script type="text/javascript">
    $(document).ready(function () {
        $('#table-brands').dataTable({
            processing: true,
            serverSide: true,
            "ajax": {
                url: "<?php echo route('admin.brands.datatables'); ?>",
                type: "POST"
            },    
            "autoWidth": false,
            "order": [[2, "asc"]],
            "columnDefs": [
                { "orderable": false, "targets": [-1, 1]},
                { "class": 'text-center width-1', "targets": 1},
            ]
        });
    });
</script>
<?php $__env->stopSection(); ?>