<!-- @extends('layouts.template')

@section('title', 'Liste des etablissements')

@section('page-title', ' etablissement')
@section('content')

<div class="card">
    <div class="card-body">
    <div class="card-header bg-info text-white">
                <h4 class="text-center">Liste des établissements</h4>
            </div>
    <a href="{{ route('etablissements.create') }}" class="btn btn-primary btn-block btn-sm mt-3"><i class="fa fa-plus"></i>Créer un Établissement</a>
    @if (session('success'))
                <div class="alert alert-success">
                    {{ session('success') }}
                </div>
            @endif
    <div class="table-responsive" style="overflow-x: auto;">
 <table class="table table-striped table-bordered display" id="zero_config">
        <thead class="table table-striped table-bordered display" id="zero_config">
        <tr>
                <th>ID</th>
                <th>Nom</th>
                <th>Sigle</th>
                <th>Ville</th>
                <th>Adresse</th>
                <th>Couleur</th>
                
            </tr>
        </thead>
        <tbody>
            @foreach($etablissements as $etablissement)
                <tr>
                <td>{{ $etablissement->idEtablissement }}</td>
                    <td>{{ $etablissement->descreta }}</td>
                    <td>{{ $etablissement->sigleeta }}</td>
                    <td>{{ $etablissement->ville }}</td>
                    <td>{!! $etablissement->adresse !!}</td>
                    <td style="background-color: {{ $etablissement->couleur }}; color: white;">
                        {{ $etablissement->couleur }}
                    </td>
                    
                </tr>
            @endforeach
        </tbody>
    </table>
    </div>
   
    </div>
</div>
    
@endsection -->
