@extends('layouts.app') @section('title', 'General – Setting') @section('body_class', 'setting-general-admin') @section('content') @php $loginPath = old('admin_login_path', $dashboardSettings->admin_login_path ?? \App\Services\AdminAccessService::loginRoutePath()); $refreshMinutes = (int) old('auto_refresh_interval_minutes', $dashboardSettings->auto_refresh_interval_minutes ?? 5); @endphp

← Setting

General

Admin access (IP allowlist and staff login URL) and dashboard auto-refresh. Visitors who are not on an allowed IP and open the site root are sent to the public store.

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif
Your IP {{ $detectedIp ?? 'unknown' }} Detected from this request
Staff login {{ $adminLoginUrl }} Current portal URL
Allowed IPs {{ $allowedIps->count() }} {{ $allowedIps->count() === 1 ? 'address on allowlist' : 'addresses on allowlist' }}
Auto-refresh @if($refreshMinutes === 0) Off @else {{ $refreshMinutes }} {{ $refreshMinutes === 1 ? 'min' : 'min' }} @endif Deals, Marketing, PWYW, Offers

Admin access

Control who can open this tools dashboard and where staff sign in.

Emergency unlock: add a row in phpMyAdmin table admin_allowed_ips, or use ADMIN_ALLOWED_IPS in .env.

Allowed IPs

Only these addresses can reach the admin tools. Keep at least one IP so you do not lock yourself out.

@if($allowedIps->isEmpty())

No IPs in the database yet. Add one below or configure ADMIN_ALLOWED_IPS in .env.

@else
@foreach($allowedIps as $ipRow) @endforeach
IP address Note Actions
{{ $ipRow->ip_address }} @if($ipRow->note) {{ $ipRow->note }} @else — @endif @if($allowedIps->count() > 1)
@csrf @method('DELETE')
@else Protected @endif
@endif
@csrf

Staff login path

Secret URL path for staff login. No leading slash.

@error('admin_login_path')

{{ $message }}

@enderror

Example: staff/avi-portal. After changing on the server, run php artisan route:clear.

Add IP

Optional. Leave blank to only save the login path.

@error('new_ip')

{{ $message }}

@enderror
@if($detectedIp)

Your current IP is {{ $detectedIp }} — use that if you need to add this device.

@endif

Auto-refresh

How often Deals, Marketing, Pay What You Want, and Offers reload in the browser.

@csrf

Refresh interval

Refresh is skipped while a modal or dialog is open. Use 0 to disable.

Default: 5. Range: 0–120.

@push('styles') @endpush @endsection