@extends('layouts.app')
@section('content')
{{-- Page Header --}}
| {{ __('#ID') }} | {{ __('Name') }} | {{ __('Email/Phone') }} | {{ __('Status') }} | {{ __('Verified') }} | {{ __('Action') }} |
|---|---|---|---|---|---|
| {{ ($users->currentPage() - 1) * $users->perPage() + $loop->iteration }} |
{{ $user->name }}
|
{{ $user->email ?? $user->phone_no }} | @php if ($user->trashed()) { // Soft deleted → red + single option $textColor = 'color: #dc3545;'; $borderColor = 'border: 2px solid #dc3545;'; } else { // Active users → status color $textColor = match ($user->status) { 'Approve' => 'color: #16a34a;', 'Pending' => 'color: #d97706;', 'Block' => 'color: #e24343;', default => 'color: #6b7280;', }; $borderColor = match ($user->status) { 'Approve' => 'border: 2px solid #86efac;', 'Pending' => 'border: 2px solid #fde68a;', 'Block' => 'border: 2px solid #e24343;', default => 'border: 2px solid #e5e7eb;', }; } @endphp |
@php
$bgColor = 'bg-success';
$textColor = 'text-success';
if ($user->email_verified_at || $user->phone_verified_at) {
$bgColor = 'bg-success';
$textColor = 'text-success';
$status = 'Verified';
} else {
$bgColor = 'bg-danger';
$textColor = 'text-danger';
$status = 'Not Verified';
}
@endphp
|
{{-- Restore User --}}
@if ($user->trashed())
|
|
{{ __('No users found') }} {{ __('Try adjusting your search criteria') }} |
|||||