{{-- resources/views/admin/user/index.blade.php --}} @extends('layouts.admin') @section('title', 'User Management') @section('page_title', 'User Management') @section('icon', 'fa-users') @section('breadcrumb') @if(request()->has('search') || request()->has('role') || request()->has('status'))
| ID | User | Contact | Role | Status | Last Login | Actions |
|---|---|---|---|---|---|---|
| #{{ $user['id'] ?? 'N/A' }} |
@if(isset($user['avatar']) && $user['avatar'])
{{ substr($user['name'] ?? '?', 0, 1) }}
@endif
{{ $user['name'] ?? 'N/A' }}
@if(isset($user['date_of_birth']))
{{ \Carbon\Carbon::parse($user['date_of_birth'])->age }} years @endif |
{{ $user['email'] ?? 'N/A' }}
@if(isset($user['phone']))
{{ $user['phone'] }}
@endif
|
@php $roleColors = [ 'admin' => 'danger', 'employee' => 'warning', 'customer' => 'info' ]; $roleColor = $roleColors[$user['role'] ?? 'customer'] ?? 'secondary'; @endphp {{ ucfirst($user['role'] ?? 'customer') }} | @if(isset($user['is_active']) && $user['is_active']) Active @else Inactive @endif |
@if(isset($user['last_login_at']) && $user['last_login_at'])
{{ \Carbon\Carbon::parse($user['last_login_at'])->diffForHumans() }}
@if(isset($user['last_login_ip']))
IP: {{ $user['last_login_ip'] }} @endif @else Never @endif |
|
No users foundTry adjusting your search filters |
||||||