@extends('layouts.cp')
@section('title', 'OTP Bypass')
@section('content')
{{-- Global Bypass Cards --}}
@foreach(['web' => 'Web', 'mobile' => 'Mobile'] as $platform => $platformLabel)
@foreach(['dev' => 'Dev', 'prod' => 'Prod'] as $env => $envLabel)
@php
$key = $platform . '-' . $env;
$globalBypass = collect($bypasses->get($key, []))->firstWhere('type', 'global');
@endphp
{{ $platformLabel }} — {{ $envLabel }}
Global bypass
{{ $globalBypass && $globalBypass->is_active ? 'ON' : 'OFF' }}
@endforeach
@endforeach
{{-- Per User Bypass --}}
Per User Bypass
{{-- User bypass list --}}
@php
$userBypasses = collect($bypasses->flatten())->where('type', 'user');
@endphp
@if($userBypasses->isEmpty())
No user bypasses.
@else
| User ID |
Platform |
Env |
Status |
Expires |
|
@foreach($userBypasses as $bypass)
| {{ $bypass->user_id }} |
{{ $bypass->platform }} |
{{ $bypass->environment }} |
{{ $bypass->is_active ? 'Active' : 'Inactive' }}
|
{{ $bypass->expired_at?->format('d M Y H:i') ?? '—' }} |
|
@endforeach
@endif
@endsection