Premier commit

This commit is contained in:
jeremy bayse
2026-02-09 11:27:21 +01:00
commit 89a369964d
114 changed files with 17837 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
@extends('layouts.app')
@section('content')
<div class="container">
<h2 class="mb-4">Gestion des Communes</h2>
<div class="card shadow-sm">
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover align-middle">
<thead>
<tr>
<th>Nom</th>
<th>Code Postal</th>
<th>Statut</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach($municipalities as $municipality)
<tr class="{{ $municipality->is_active ? '' : 'table-warning' }}">
<td>{{ $municipality->name }}</td>
<td>{{ $municipality->zip_code }}</td>
<td>
@if($municipality->is_active)
<span class="badge bg-success">Active</span>
@else
<span class="badge bg-secondary">Désactivée</span>
@endif
</td>
<td>
<form action="{{ route('admin.municipalities.toggle', $municipality) }}" method="POST">
@csrf
<button type="submit" class="btn btn-sm {{ $municipality->is_active ? 'btn-outline-danger' : 'btn-outline-success' }}">
{{ $municipality->is_active ? 'Désactiver' : 'Activer' }}
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection