@extends('layouts.admin') @section('title', 'کدهای فعالسازی') @section('styles') @endsection @section('content') {{-- ── آمار سریع ──────────────────────────────────────────────────────── --}}
{{ number_format($stats['total']) }}
کل کدها
{{ number_format($stats['active']) }}
فعال (قابل استفاده)
{{ number_format($stats['expired']) }}
منقضی شده
{{ number_format($stats['used']) }}
استفاده شده
{{-- ── ساخت کد دستی ───────────────────────────────────────────────────── --}}

add_circle_outline ساخت کد فعالسازی دستی برای کاربر

@csrf
@if(session('success'))
check_circle {{ session('success') }}
@endif @if(session('error'))
error {{ session('error') }}
@endif
{{-- ── فیلتر و جستجو ──────────────────────────────────────────────────── --}}
clear پاک‌کردن
@csrf
{{-- ── جدول کدها ──────────────────────────────────────────────────────── --}}

کدهای فعالسازی {{ $otpCodes->total() }} کد یافت شد

@if($otpCodes->isEmpty())
vpn_key_off کدی یافت نشد
@else
@foreach($otpCodes as $otp) @php $status = $otp->status; $isActive = $status === 'active'; @endphp {{-- کد --}} {{-- تماس --}} {{-- کاربر --}} {{-- نوع --}} {{-- وضعیت --}} {{-- انقضا --}} {{-- زمان ارسال --}} {{-- عملیات --}} @endforeach
# کد فعالسازی شماره / ایمیل کاربر نوع وضعیت انقضا زمان ارسال عملیات
{{ $otp->id }} {{ $otp->code }} @if($isActive)
touch_app برای کپی کلیک کنید @endif
@if($otp->phone) phone {{ $otp->phone }} @endif @if($otp->email)
email {{ $otp->email }} @endif
@if($otp->user) {{ $otp->user->full_name ?: '—' }}
#{{ $otp->user_id }} @else @endif
{{ $otp->type_label }} @if($status === 'active') check_circle فعال @elseif($status === 'used') done_all استفاده شده @else timer_off منقضی @endif @if($otp->expires_at) @if($isActive) {{ $otp->expires_at->format('H:i') }}
@else {{ $otp->expires_at->format('Y/m/d H:i') }} @endif @else — @endif
{{ $otp->created_at ? $otp->created_at->format('Y/m/d H:i:s') : '—' }}
{{ $otp->created_at ? $otp->created_at->diffForHumans() : '' }}
@if(!$otp->verified)
@csrf
@else @endif
{{-- Pagination --}}
{{ $otpCodes->links() }}
@endif
@endsection @section('scripts') @endsection