<?php $__env->startSection('content'); ?>
    <div class="wrapper">
        <?php echo $__env->make('partials.message', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        <?php echo $__env->make('reasons.create', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        <?php echo $__env->make('reasons.edit', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        <div class="row">
            <?php echo Form::open(['method' => 'delete', 'action' => ['ReasonController@destroy',0], 'class' => 'hidden','id' => 'deleteReason', ]); ?>

            <?php echo Form::close(); ?>

            <div class="col-sm-12">
                <div class="panel">
                    <div class="panel-heading">
                        Motivos
                    </div>
                    <div class="panel-body">
                        <div class="btn-group btn-group-sm pull-right">
                            <a href="#create" class="btn btn-primary" data-toggle="modal" id="create">
                                <i class="fa fa-plus"></i> Agregar
                            </a>
                            <hr>
                        </div>
                        <table class="table table-bordered table-striped table-hover">
                            <thead>
                                <th>
                                    ID
                                </th>
                                <th>
                                    Nombre
                                </th>
                                <th>
                                    Acciones
                                </th>
                            </thead>
                            <tbody>
                                <?php foreach($reasons as $reason): ?>
                                    <tr>
                                        <td>
                                            <?php echo e($reason->id); ?>

                                        </td>
                                        <td>
                                            <?php echo e($reason->name); ?>

                                        </td>
                                        <td>
                                            <a href="#" data-toggle="tooltip" title="Editar" class="btn btn-primary btn-edit btn-xs" data-id="<?php echo e($reason->id); ?>">
                                                <i class="fa fa-pencil" aria-hidden="true"></i>
                                            </a>
                                            <a href="#" class="btn btn-danger btn-delete btn-xs" data-id="<?php echo e($reason->id); ?>" data-toggle="tooltip" title="Eliminar">
                                                <i class="fa fa-trash-o" aria-hidden="true"></i>
                                            </a>
                                        </td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>

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

<?php $__env->startSection('script'); ?>
    <script type="text/javascript" src="<?php echo e(asset('js/reasons.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>