<?php $__env->startSection('content'); ?>
<div class="container contingut">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div class="panel panel-default">
                <div class="panel-heading"><h4>Alta de vehicles amb autoritzacio</h4></div>
                <?php echo $__env->make('errors.errors', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                <div class="panel-body">
                    <?php echo csrf_field(); ?>

                        <!--<h3>Dades Propietari</h3>
                        <label for="nom">Nom:</label><input type="text" name="nom" id="nom">
                        <label for="cognom">Cognoms:</label><input type="text" name="cognom" id="cognom">
                        <label for="dni">DNI:</label><input type="text" name="dni" id="dni"><br>
                        <label for="direccio">Direccio:</label><input type="text" name="direccio" id="direccio">
                        <label for="poblacio">Població:</label><input type="text" name="poblacio" id="poblacio">
                        <label for="codi_postal">Codi Postal:</label><input type="text" name="codiPostal" id="codiPostal"><br>


                        <h3>Dades Vehicle</h3>-->
                        <div class="form-inline">
                            <div class="form-group">
                                <label for="matricula" class="col-lg-2 control-label">Matricula:</label>
                                <div class="col-lg-10">
                                    <input type="text" name="matricula" id="matricula" class="form-control" placeholder="ex:0000BBB | L0000AB"/>
                                </div>
                                <label for="marca"  class="col-lg-2 control-label">Marca:</label>
                                <div class="col-lg-10">
                                    <input type="text" name="marca" id="marca" class="form-control" placeholder="Marca vehicle"/>
                                </div>
                                <label for="model"  class="col-lg-2 control-label">Model:</label>
                                <div class="col-lg-10">
                                    <input type="text" name="model" id="model" class="form-control" placeholder="Model vehicle"/>
                                </div>

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

                                <label id="Alta" class="col-xs-offset-2 col-xs-9">
                                    <button type="submit" class="btn btn-primary">
                                        <i class="glyphicon glyphicon-send"> Enviar </i>
                                    </button>
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="panel-heading">
                        <?php if($autoritzats): ?>
                        <table class="table table-striped">
                            <thead>
                                <tr>
                                    <th>Matrícula</th>
                                    <th>Marca</th>
                                    <th>Data Alta</th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                            <?php foreach($autoritzats as $key => $data): ?>
                                <tr id="<?php echo e($data->id); ?>">
                                    <td class="matricula"><?php echo e($data->matricula); ?></td>
                                    <td><?php echo e($data->marca); ?></td>
                                    <td class="data"><?php echo e(date("d-m-y",strtotime($data->data_alta))); ?></td>
                                    <td>
                                        <lavel id="borrarVehicle">
                                            <button type="submit" class="btn btn-danger" value="<?php echo e($data->id); ?>">
                                                <i class="glyphicon glyphicon-remove"> Eliminar</i>
                                            </button>
                                        </lavel>
                                    </td>
                                </tr>
                            <?php endforeach; ?>
                            </tbody>
                        </table>
                    <?php endif; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
<?php echo $__env->make('partials.menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>