This commit is contained in:
2025-04-20 11:04:45 +05:00
parent 711a6dddad
commit 2c76c6bad2
3 changed files with 15 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ use GuzzleHttp\Psr7\Request as GuzzleRequest;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Stevebauman\Location\Facades\Location;
use Symfony\Component\HttpFoundation\IpUtils;
/**
* Application locales
@@ -49,15 +50,15 @@ function isLocalIp(string $ip = ''): bool
*/
function isTurkmenIp(string $ip = ''): bool
{
$patterns = ['95.85', '216'];
foreach ($patterns as $pattern) {
if (strpos($ip, $pattern) === 0) {
return true;
}
}
return false;
return IpUtils::checkIp($ip, [
'95.85.192.0/19',
'95.85.224.0/20',
'95.85.240.0/21',
'95.85.248.0/22',
'95.85.252.0/22',
'217.174.224.0/19',
'91.207.136.0/22',
]);
}
/**

View File

@@ -128,7 +128,10 @@ class CardOrder extends Model
return $this->cardState->price ?? 32;
}
public function really()
/**
* Return ID ))
*/
public function really(): int
{
return $this->id;
}