@extends('layouts.admin') @section('page_header') @endsection @section('content') @php $perSelected = (int) ($filters['per_page'] ?? request('per_page', 10)); if (!in_array($perSelected, [10,25,50,100], true)) $perSelected = 10; $qValue = $filters['q'] ?? request('q',''); $banPillClass = fn($banned) => $banned ? 'bg-danger-transparent text-danger' : 'bg-success-transparent text-success'; @endphp
{{-- Filter --}}
Entries
{{-- Table --}}
@forelse($users as $u) @php $banned = (bool)$u->is_reservation_banned; $reserveLabel = $banned ? 'banned' : 'allowed'; $reserveClass = $banPillClass($banned); $lic = trim(($u->license_class ?? '').' - '.($u->license_number ?? '')); $licExp = $u->license_expires_at ? (' / exp: '.optional($u->license_expires_at)->format('d.m.Y')) : ''; $licCell = $lic ? ($lic.$licExp) : '—'; $banInfo = []; if ($banned) { if ($u->reservation_ban_until) $banInfo[] = 'until '.optional($u->reservation_ban_until)->format('d.m.Y'); if ($u->reservation_ban_reason) $banInfo[] = $u->reservation_ban_reason; } $banTitle = $banned && $banInfo ? e(implode(' · ', $banInfo)) : ''; @endphp @empty @endforelse
Full Name Email Phone Licence Reservation Action
{{ $u->name }}
{{ $u->email }} {{ $u->phone ?? '—' }} {{ $licCell }} {{ $reserveLabel }}
{{-- Ban / Unban --}} @if(!$banned) @else @endif {{-- Edit --}} {{-- Delete --}}
- No records found -
{{-- Pagination --}}
@if($users->total() > 0) Showing {{ $users->firstItem() }} to {{ $users->lastItem() }} of {{ $users->total() }} entries @else Showing 0 to 0 of 0 entries @endif
{{-- Create Modal --}} {{-- Edit Modal --}} {{-- Ban Modal (sebep/tarih) --}} {{-- SweetAlert2 --}} @endsection