{{ $user->name }} {{-- Breadcrumb --}}
Users {{ $user->name }}
{{-- User Info --}}

User Information

{{ strtoupper(substr($user->name, 0, 1)) }}

{{ $user->name }}

{{ $user->email }}

Unique Email

{{ $user->unique_email }}

Role

{{ $user->role === 'user' ? 'Customer' : ucfirst($user->role) }}

Credit Balance

{{ $user->credit_balance }}

Max Books

{{ $user->max_books ?? 'Unlimited' }}

Joined

{{ $user->created_at->format('M d, Y') }}

@if(auth()->user()->isAdmin()) {{-- User Options --}}

User Options

@csrf

Leave empty for unlimited.

{{-- Update Password --}}

Update Password

@csrf
@error('password')

{{ $message }}

@enderror
{{-- Adjust Credits --}}

Adjust Credits

@csrf
@if(auth()->id() !== $user->id)

Delete User

This removes the user from the app (soft delete).

@csrf @method('DELETE')
@endif @endif
{{-- User Activity --}}
{{-- Books --}}

Books ({{ $user->books->count() }})

@forelse($user->books as $book)

{{ $book->title }}

{{ $book->chapters_count }} chapters · {{ number_format($book->word_count) }} words

View Edit {{ $book->created_at->format('M d, Y') }}
@empty

No books yet

@endforelse
{{-- Credit History --}}

Credit History

@forelse($user->credits()->latest()->take(10)->get() as $credit)

{{ ucfirst(str_replace('_', ' ', $credit->type)) }}

{{ $credit->description }}

{{ $credit->amount > 0 ? '+' : '' }}{{ $credit->amount }}

Balance: {{ $credit->balance_after }}

@empty

No credit history

@endforelse