

<?php $__env->startPush('plugin-styles'); ?>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
  

  <div class="col-lg-12 grid-margin stretch-card">
    <div class="card">
      
      <div class="card-body">

        <?php if(session('status')): ?>
            <div class="row clearfix">
                <div class="col-sm-12">
                    <div class="alert alert-success">
                        <?php echo e(session('status')); ?>

                    </div>
                </div>
            </div>
        <?php endif; ?> 
             
        <div id="pesquisar">
          <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('matCategoria-create')): ?>
            <div style="float:left">
              <a href="<?php echo e(route('mat-categoria.create')); ?>" class="btn btn-primary btn-fw btn-add"><i class="mdi mdi-plus"></i>Adicionar</a>
            </div>
           <?php endif; ?>
           <?php echo $__env->make('layout.pagination-blog', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        </div>

        <div style="clear: both;">
            <h4 class="card-title">Categorias Material Educativo </h4>
            <p class="card-description"> Listagem de categorias de materiais educativos </p>
        </div>
        <div class="table-responsive">
          <table class="table table-striped">
            <thead>
              <tr>
                <th> Id </th>
                <th> Nome </th>
                <th> idioma </th>
                <th> Ações </th>
              </tr>
            </thead>
            <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $objs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $obj): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
              <tr>
                <td> <?php echo e($obj->id); ?> </td>
                <td> <?php echo e($obj->title); ?> </td>
                <td> <?php echo e(substr($obj->language_id,0,2)); ?> </td>
                <td> 
                    <form action="<?php echo e(route('mat-categoria.destroy', $obj->id)); ?>" method="post">
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('matCategoria-edit')): ?>
                            <a title="Editar" class="btn btn-icons btn-inverse-warning" href="<?php echo e(route('mat-categoria.edit', $obj->id)); ?>"><i class="mdi mdi-grease-pencil"></i></a>
                        <?php endif; ?>    
                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('matCategoria-delete')): ?>              
                            <?php echo e(method_field('DELETE')); ?>

                            <?php echo e(csrf_field()); ?>

                            <button title="Deletar" class="btn btn-icons btn-inverse-danger btn-delete"><i class="mdi mdi-delete"></i></button>   
                        <?php endif; ?>    
                    </form>     
                </td>
              </tr>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            </tbody>
              <tr>
                <td colspan="6">Nenhum registro encontrado.</td>
              </tr>
            <?php endif; ?>
          </table>
          <?php echo e($objs->appends(request()->input())->links()); ?>

        </div>
      </div>
    </div>
  </div>
  
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('plugin-scripts'); ?>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('custom-scripts'); ?>
<?php $__env->stopPush(); ?>

        
<?php echo $__env->make('layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/site.apoiocotacoes.com.br/apoio/resources/views/admin/mat-categorias/index.blade.php ENDPATH**/ ?>