@extends('layouts.app') @section('title', 'User Management') @section('content')
| # | Client Name | Username | MAC Address | IP Address | Package | Status | Online | Zone | Branch | Created By | Connection Date | Expiry Date | Balance | Due |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $client['name'] }}
{{ $client['phone'] }}
|
{{ $client['username'] }}
|
{{ $client['mac_address'] }}
|
@if($client['ip_address'])
{{ $client['ip_address'] }}
@else
-
@endif
|
{{ $client['package_name'] }}
BDT {{ number_format($client['package_price']) }}
|
@php $statusClass = match($client['status']) { 'active' => 'success', 'inactive' => 'secondary', 'suspended' => 'warning', 'expired' => 'danger', default => 'secondary' }; @endphp {{ ucfirst($client['status']) }} | @if($client['is_online']) Online @else Offline @endif |
{{ $client['zone'] ?? '-' }}
@if($client['sub_zone'])
{{ $client['sub_zone'] }}
@endif
|
{{ $client['branch_name'] }} |
@php
$createdByUser = \App\Models\User::find($client['created_by_user']);
@endphp
@if($createdByUser)
{{ $createdByUser->name }}
{{ ucfirst($createdByUser->role) }}
|
{{ $client['connection_date'] ? \Carbon\Carbon::parse($client['connection_date'])->format('M d, Y') : '-' }} | @php $expiryDate = $client['expiry_date'] ? \Carbon\Carbon::parse($client['expiry_date']) : null; $isExpired = $expiryDate && $expiryDate->isPast(); $expiresSoon = $expiryDate && $expiryDate->diffInDays(now()) <= 7; @endphp @if($expiryDate) {{ $expiryDate->format('M d, Y') }} @else - @endif | BDT {{ number_format($client['balance']) }} | @if($client['total_due'] > 0) BDT {{ number_format($client['total_due']) }} @else BDT 0 @endif |
| SL | User | ISP Name | Total Users | Total Branch | Role | Status | Assign Menu | Last Login | Created | Actions |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
@if($user->profile_photo)
@php
$imagePath = asset('storage/' . $user->profile_photo);
@endphp
{{ $user->name }}{{ $user->email }} @if($user->phone){{ $user->phone }} @endif |
@if($user->company_name)
{{ $user->company_name }}
@elseif($user->branch)
{{ $user->branch->name }}
{{ $user->branch->code }} @else No Company @endif |
{{ $user->childUsers->count() }}
Child Users |
@if($user->branch)
{{ $user->branch->childBranches->count() }}
Sub Branches @else 0 @endif |
Super Admin |
{{ ucfirst($user->status) }}
@if($isCurrentUserSuperAdmin)
is_active ? 'checked' : '' }}
onchange="toggleUserStatus({{ $user->id }})">
@endif
|
@if($user->last_login_at)
{{ $user->last_login_at->diffForHumans() }}
{{ $user->last_login_at->format('M d, Y H:i') }}
@else
Never
@endif
|
{{ $user->created_at->format('M d, Y') }} |
| SL | User | ISP Name | Total Users | Total Branch | Role | Status | Assign Menu | Last Login | Created | Actions |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ ($users->currentPage() - 1) * $users->perPage() + $index + 1 }} |
@if($user->profile_photo)
@php
$imagePath = asset('storage/' . $user->profile_photo);
@endphp
{{ $user->name }}{{ $user->email }} @if($user->phone){{ $user->phone }} @endif |
@if($user->company_name)
{{ $user->company_name }}
@elseif($user->branch)
{{ $user->branch->name }}
{{ $user->branch->code }} @else No Company @endif |
{{ $user->childUsers->count() }}
Child Users |
@if($user->branch)
{{ $user->branch->childBranches->count() }}
Sub Branches @else 0 @endif |
{{ ucfirst($user->role) }} |
{{ ucfirst($user->status) }}
@if($isCurrentUserSuperAdmin)
is_active ? 'checked' : '' }}
onchange="toggleUserStatus({{ $user->id }})">
@endif
|
@if($user->last_login_at)
{{ $user->last_login_at->diffForHumans() }}
{{ $user->last_login_at->format('M d, Y H:i') }}
@else
Never
@endif
|
{{ $user->created_at->format('M d, Y') }} | ||
|
No users found. |
||||||||||
| SL | User | ISP Name | Total Users | Total Branch | Role | Status | Assign Menu | Last Login | Created | Actions |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $user->name }}{{ $user->email }} @if($user->phone){{ $user->phone }} @endif |
@if($user->company_name)
{{ $user->company_name }}
@elseif($user->branch)
{{ $user->branch->name }}
{{ $user->branch->code }} @else No Company @endif |
{{ $user->childUsers->count() }}
Child Users |
@if($user->branch)
{{ $user->branch->childBranches->count() }}
Sub Branches @else 0 @endif |
Reseller |
{{ ucfirst($user->status) }}
@if($isCurrentUserSuperAdmin)
is_active ? 'checked' : '' }}
onchange="toggleUserStatus({{ $user->id }})">
@endif
|
@if($user->last_login_at)
{{ $user->last_login_at->diffForHumans() }}
{{ $user->last_login_at->format('M d, Y H:i') }}
@else
Never
@endif
|
{{ $user->created_at->format('M d, Y') }} |
| SL | User | Company | Phone | Role | Status | Assign Menu | Last Login | Created | Actions | |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $user->name }}ID: {{ $user->id }} |
{{ $user->company_name ?? '-' }} | {{ $user->email }} | {{ $user->phone ?? '-' }} | {{ ucfirst($user->role) }} | {{ ucfirst($user->status) }} | @if($user->last_login_at) {{ \Carbon\Carbon::parse($user->last_login_at)->diffForHumans() }} @else Never @endif | {{ \Carbon\Carbon::parse($user->created_at)->format('M d, Y') }} |
| SL | Name | Admin User | Parent Branch | Parent User | Assigned Router | Total Clients | Status | Created | Actions |
|---|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $branch['name'] }}
{{ $branch['code'] }}
|
{{ $branch['admin_user']['name'] }}
{{ $branch['admin_user']['email'] }}
{{ $branch['admin_user']['role'] }} |
{{ $branch['parent_branch']['name'] }}
{{ $branch['parent_branch']['code'] }}
|
{{ $branch['parent_user']['name'] }}
{{ $branch['parent_user']['email'] }}
|
@foreach($branch['assigned_routers'] as $router)
{{ $router['name'] }}
{{ $router['ip'] }}
|
{{ $branch['total_clients'] }}
Clients
|
{{ $branch['status'] }} |
{{ explode(' ', $branch['created_at'])[0] }}
{{ explode(' ', $branch['created_at'])[1] }}
|
|
| SL | User | Branch | Role | Status | Assigned Menus | Last Login | Created | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ $user['name'] }}
{{ $user['email'] }}
@if($user['phone'])
{{ $user['phone'] }} @endif |
{{ $user['branch_name'] }}
{{ $user['branch_code'] }}
|
{{ ucfirst($user['role']) }} |
{{ $user['is_active'] ? 'Active' : 'Inactive' }}
|
{{ $user['menus_count'] }} Menus | {{ $user['last_login_at'] }} | {{ $user['created_at'] }} |