@extends('layouts.app')

@section('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>Llista d'usuaris</h4>
                </div>
                <div class="panel-body">
                </div>
                <div class="panel-heading">
                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <th>Nom</th>
                                <th>Email</th>
                                <th>Data alta</th>
                                <th></th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach($User as $key => $usr)
                                <tr class="success" id="{{ $usr->id }}">
                                    <td>
                                        {{$usr->name}}
                                    </td>
                                    <td>
                                        {{ $usr->email}}
                                    </td>
                                    <td class="data">
                                        {{ $usr->created_at}}
                                    </td>

                                    <td>
                                        <label id="borrarUsuari">
                                            <button type="submit" class="btn btn-danger btn-sm" value="{{ $usr->id}}"
                                                    data-content="Eliminar definitivament l'acces" title="Eliminar" data-toggle="popover" data-trigger="hover">
                                                <i class="glyphicon glyphicon-remove"> Eliminar </i>
                                            </button>
                                        </label>
                                    </td>
                                </tr>
                            @endforeach
                        </tbody>
                    </table>
                </div>
             </div>
        </div>
    </div>
</div>
@endsection

