wip
This commit is contained in:
@@ -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',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ parameters:
|
||||
- app/
|
||||
|
||||
# Level 9 is the highest level
|
||||
level: 6
|
||||
level: 7
|
||||
|
||||
# ignoreErrors:
|
||||
# - '#PHPDoc tag @var#'
|
||||
|
||||
Reference in New Issue
Block a user