@extends('layouts.public') @section('title', 'Gestion des billets - ' . $event->title) @section('content')
@if (session('success'))

{{ session('success') }}

@endif @if (session('error'))

{{ session('error') }}

@endif @if ($ticketTypes->count() > 0)
@php $totalTypes = $ticketTypes->count(); $activeTypes = $ticketTypes->where('is_active', true)->count(); $totalSold = $ticketTypes->sum('sold'); $totalRevenue = $ticketTypes->sum(function ($ticket) { return $ticket->sold * $ticket->price; }); @endphp
Types de billets
{{ $totalTypes }}
Types actifs
{{ $activeTypes }}
Billets vendus
{{ number_format($totalSold) }}
Revenus
{{ number_format($totalRevenue) }} FCFA

Types de billets configurés

@foreach ($ticketTypes as $ticketType) @endforeach
Type de billet Prix Disponibilité Ventes Statut Actions
{{ $ticketType->name }}
@if ($ticketType->description)
{{ Str::limit($ticketType->description, 60) }}
@endif
@if ($ticketType->price > 0) {{ number_format($ticketType->price) }} FCFA @else Gratuit @endif
@if ($ticketType->quantity) {{ $ticketType->remainingQuantity() ?? 0 }} / {{ $ticketType->quantity }}
@php $percentage = $ticketType->quantity > 0 ? ($ticketType->sold / $ticketType->quantity) * 100 : 0; @endphp
@else Illimité @endif
{{ $ticketType->sold }}
@if ($ticketType->sold > 0)
{{ number_format($ticketType->sold * $ticketType->price) }} FCFA
@endif
@if ($ticketType->is_active) Actif @else Inactif @endif
@csrf @method('PATCH')
@if ($ticketType->sold == 0)
@csrf @method('DELETE')
@endif
@else

Aucun type de billet configuré

Commencez par créer les différents types de billets pour votre événement.

@endif
@endsection