

<?php $__env->startSection('content'); ?>
<div class="container">
    <div class="container-header">
        <h1><?php echo e($pageTitle); ?></h1>
    </div>
    <div class="card">
        <div class="card-body">
            <form action="<?php echo e(isset($server) ? route('backend.otp-server.update', $server->id) : route('backend.otp-server.store')); ?>" method="post">
                <?php echo csrf_field(); ?>
                <?php if(isset($server)): ?> <?php echo method_field('PUT'); ?> <?php endif; ?>
                <div class="form-group mb-25">
                    <label class="form-label">API <span class="required">*</span></label>
                    <select name="otp_api_id" class="form-control" required>
                        <?php $__currentLoopData = $apis; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $api): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($api->id); ?>" <?php echo e(old('otp_api_id', $server->otp_api_id ?? '') == $api->id ? 'selected' : ''); ?>><?php echo e($api->api_name); ?></option>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                </div>
                <div class="form-group mb-25">
                    <label class="form-label">Server Name <span class="required">*</span></label>
                    <input type="text" class="form-control" name="server_name" value="<?php echo e(old('server_name', $server->server_name ?? '')); ?>" required>
                </div>
                <div class="form-group mb-25">
                    <label class="form-label">Server / Country Code <span class="required">*</span></label>
                    <input type="text" class="form-control" name="server_code" value="<?php echo e(old('server_code', $server->server_code ?? '')); ?>" placeholder="e.g. 0 or ng" required>
                </div>
                <div class="form-group mb-25">
                    <label class="form-label">Status</label>
                    <select name="status" class="form-control">
                        <option value="1" <?php echo e(old('status', $server->status ?? 1) == 1 ? 'selected' : ''); ?>>Active</option>
                        <option value="0" <?php echo e(old('status', $server->status ?? 0) == 0 ? 'selected' : ''); ?>>Inactive</option>
                    </select>
                </div>
                <button type="submit" class="btn btn-primary">Save</button>
            </form>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('backend.layout.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\HP\Desktop\nbverify\mine\resources\views/backend/otp-servers/form.blade.php ENDPATH**/ ?>