@extends('layouts.admin') @section('title', 'View User') @section('content')

User Details

Personal Information
{{ $user->name }}
{{ $user->email }}

{{ ucfirst($user->role) }}

User Bookings
@if($user->bookings && $user->bookings->count() > 0)
@foreach($user->bookings as $booking) @endforeach
Booking Code Route Date Status Price
{{ $booking->booking_code }} {{ $booking->route_from }} → {{ $booking->route_to }} {{ $booking->departure_date->format('d M Y') }} {{ ucfirst($booking->status) }} Rp {{ number_format($booking->price, 0, ',', '.') }}
@else
No bookings found for this user
@endif
Account Info

User ID:
{{ $user->id }}

Created:
{{ $user->created_at->format('d M Y H:i:s') }}

Last Updated:
{{ $user->updated_at->format('d M Y H:i:s') }}


Total Bookings:
{{ $user->bookings ? $user->bookings->count() : 0 }}

@if($user->bookings)

Total Spent:
Rp {{ number_format($user->bookings->sum('price'), 0, ',', '.') }}

@endif
@endsection