@extends('admin.layouts.app') @section('title', 'Users') @section('page-title', 'User Management') @section('content')
| ID | Name | Role | Joined | Last Login | Actions | |
|---|---|---|---|---|---|---|
| #{{ $user->id }} |
@if($user->profile_picture)
{{ strtoupper(substr($user->name, 0, 1)) }}
@endif
@php
$firstName = explode(' ', $user->name)[0];
$shortName = strlen($firstName) > 10 ? substr($firstName, 0, 10) . '...' : $firstName . '...';
@endphp
{{ $shortName }}
|
{{ $user->email }} | @if($user->is_admin) @if($user->id === 1) Super Admin @else Admin @endif @else User @endif | {{ $user->created_at->format('d M Y') }} | @if($user->last_login_at) {{ $user->last_login_at->diffForHumans() }} @else Never @endif |
@if($user->id === 1 && auth()->id() !== 1)
{{-- Super admin (Rei) - No actions for other admins --}}
Protected by Devils
@elseif($user->is_admin && $user->id !== auth()->id() && auth()->id() !== 1)
{{-- Other admin - Only super admin can manage --}}
Super Admin Authorities
@else
Edit
@if($user->id !== auth()->id())
@endif
@if($user->id !== auth()->id() && auth()->id() === 1)
@endif
@endif
|
| No users found. | ||||||