@extends('layouts.app') @section('title', 'Mes Hostels') @section('content')

Mes Hostels

{{ $hostels->count() }} établissement(s) enregistré(s)

+ Ajouter un hostel
@if(session('success'))
✅ {{ session('success') }}
@endif @if(session('error'))
❌ {{ session('error') }}
@endif @forelse($hostels as $hostel)
{{-- Icône --}}
{{ $hostel->type === 'camping' ? '🏕' : '🏨' }}
{{-- Infos --}}

{{ $hostel->name }}

@if($hostel->id == $activeId) ✓ Actif @endif @if(!($hostel->is_active ?? true)) 🚫 Désactivé @endif
@if($hostel->region) 📍 {{ $hostel->region->name }} @elseif($hostel->city) 📍 {{ $hostel->city }} @endif @if($hostel->type) {{ $hostel->type }} @endif @if($hostel->phone) 📞 {{ $hostel->phone }} @endif
{{-- Actions --}}
{{-- Basculer --}} @if($hostel->id != $activeId && ($hostel->is_active ?? true))
@csrf
@endif {{-- Modifier --}} Modifier {{-- Supprimer --}} @if($hostels->count() > 1)
@csrf @method('DELETE')
@endif
{{-- Description --}} @if($hostel->description)

{{ $hostel->description }}

@endif
@empty
🏨

Aucun hostel enregistré

Créer mon premier hostel
@endforelse
@endsection