<?php
namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;

class CheckIp
{
    public function handle(Request $request, Closure $next)
    {
        $allowedIps = ['63.250.38.13']; // Whitelist IPs here

        if (!in_array($request->ip(), $allowedIps)) {
            abort(403, 'Unauthorized IP address');
        }

        return $next($request);
    }
}
