@extends('backEnd.layouts.master') @section('title', 'Manage Users') @section('css') @endsection @section('content')
{{-- PAGE HEADER --}}

Manage Users

Overview of all registered users and their roles.

Create User
@foreach($data as $key => $value) @php // Role Check Logic $isAdminUser = method_exists($value, 'hasRole') ? $value->hasRole('Admin') : false; $isLoginAdmin = auth()->check() && method_exists(auth()->user(), 'hasRole') ? auth()->user()->hasRole('Admin') : false; @endphp {{-- Hide Admin Rows from Non-Admins --}} @if($isAdminUser && !$isLoginAdmin) @continue @endif {{-- Name --}} {{-- Email --}} {{-- Status --}} {{-- Actions --}} @endforeach
# User Name Email Address Status Actions
{{ $loop->iteration }}
{{ substr($value->name, 0, 1) }}
{{ $value->name }}
{{ $value->email }} @if($value->status == 1) Active @else Inactive @endif
{{-- Status Toggle --}}
@csrf
{{-- Edit --}} {{-- Delete --}}
@csrf
@endsection @section('script') @endsection