@extends('admin.layout') @section('title', 'Gestion des absences') @section('content')

@yield('title')

@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif
@if (!empty($q)) @endif
@forelse ($absences as $absence) @empty @endforelse
# Nom Date début Date fin Raison Saisi par
{{ $absences->total() - ($absences->currentPage() - 1) * $absences->perPage() - $loop->index }} @php $nomAbsent = trim(($absence['first_name_absent'] ?? '') . ' ' . ($absence['last_name_absent'] ?? '')) ?: '—'; @endphp @if (!empty($absence['user_id']) && auth()->user()->can('users.view')) {{ $nomAbsent }} @else {{ $nomAbsent }} @endif {{ !empty($absence['begin_date']) ? \Carbon\Carbon::parse($absence['begin_date'])->format('d/m/Y') : '—' }} {{ !empty($absence['end_date']) ? \Carbon\Carbon::parse($absence['end_date'])->format('d/m/Y') : '—' }} {{ $absence['reason'] ?? '—' }} {{ trim(($absence['first_name_author'] ?? '') . ' ' . ($absence['last_name_author'] ?? '')) ?: '—' }}
Aucune absence trouvée.
{{ $absences->links() }}
@endsection