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

View File

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

View File

@@ -7,7 +7,7 @@ parameters:
- app/ - app/
# Level 9 is the highest level # Level 9 is the highest level
level: 6 level: 7
# ignoreErrors: # ignoreErrors:
# - '#PHPDoc tag @var#' # - '#PHPDoc tag @var#'