@extends('layouts.admin') @section('breadcrumb', 'User Details') @section('content')

{{ $user->name }}

User account details and management

Edit User @if($user->id !== auth()->id())
@csrf @method('DELETE')
@endif
@if(session('success'))
{{ session('success') }}
@endif
{{ substr($user->name, 0, 1) }}

{{ $user->name }}

{{ $user->getRoleName() }}
@if($user->id !== auth()->id())
@csrf @method('PATCH')
@endif

{{ $user->name }}

{{ $user->email }}

{{ $user->phone ?: 'Not provided' }}

{{ $user->getRoleName() }} @forelse($user->adminRoles as $assignedRole) {{ $assignedRole->name }} @empty No role assigned @endforelse
@if($user->email_verified_at) Active @else Inactive @endif

{{ $user->created_at->ist()->format('F j, Y') }}

{{ $user->created_at->diffForHumans() }}

{{ $user->last_login_at ? $user->last_login_at->ist()->format('F j, Y \a\t g:i A') : 'Never logged in' }}

@if($user->last_login_at)

{{ $user->last_login_at->diffForHumans() }}

@endif

{{ $user->updated_at->ist()->format('F j, Y \a\t g:i A') }}

{{ $user->updated_at->diffForHumans() }}

{{ $user->id }}

@if($user->address)

{{ $user->address }}

@endif

Role Permissions

@if($user->isAdmin())

Administrator Access — {{ $user->getAdminRoleName() }}

@if($user->isSuperAdmin())

Full access to every admin menu.

@elseif($user->adminRoles->isEmpty())

No admin role assigned, so only the Dashboard is available.

@else

Dashboard plus the menus below, combined across {{ $user->adminRoles->count() }} {{ Str::plural('role', $user->adminRoles->count()) }}:

@forelse($user->accessibleMenuKeys() as $key) {{ \App\Support\AdminMenu::label($key) }} @empty Dashboard only @endforelse
@endif
@else

Standard User Access:

  • Browse and search book catalog
  • Purchase books and manage orders
  • Manage personal profile and preferences
  • View order history and tracking
  • Add books to wishlist and favorites
@endif
@if($user->id === auth()->id()) This is your account @endif
@endsection