@extends('layouts.admin') @section('title', 'User Management') @section('subtitle', 'Provision and manage all user accounts') @section('content')

All Accounts

{{ $users->total() }} total
@foreach($users as $user) @endforeach
User Role Status Actions
{{ strtoupper(substr($user->name, 0, 1)) }}

{{ $user->name }}

{{ $user->email }}

@php $roleColors = [ 'admin' => 'bg-purple-100 text-purple-700', 'manager' => 'bg-indigo-100 text-indigo-700', 'staff' => 'bg-blue-100 text-blue-700', 'editor' => 'bg-blue-100 text-blue-700', 'user' => 'bg-slate-100 text-slate-600' ]; @endphp {{ $user->role }} {{ $user->is_active ? 'Active' : 'Disabled' }} @if(auth()->user()->role !== 'admin' && $user->role === 'admin') lock Protected @else
@php $canImpersonate = false; if ($user->id !== auth()->id()) { if (auth()->user()->role === 'admin') { $canImpersonate = ($user->role !== 'admin'); } elseif (auth()->user()->role === 'manager') { $canImpersonate = in_array($user->role, ['user', 'staff', 'editor']); } } @endphp @if($canImpersonate) login Login as @endif edit @if($user->id !== auth()->id())
@csrf
@endif
@endif
@if($users->hasPages())
{{ $users->links() }}
@endif

person_add New Account

@csrf
@endsection