mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 14:53:45 +02:00
@@ -42,12 +42,12 @@ class MultiFieldServerFilter implements Filter
|
||||
$parts = explode(':', $value);
|
||||
|
||||
$builder->when(
|
||||
!Str::startsWith($value, ':'),
|
||||
! Str::startsWith($value, ':'),
|
||||
// When the string does not start with a ":" it means we're looking for an IP or IP:Port
|
||||
// combo, so use a query to handle that.
|
||||
function (Builder $builder) use ($parts) {
|
||||
$builder->orWhere('allocations.ip', $parts[0]);
|
||||
if (!is_null($parts[1] ?? null)) {
|
||||
if (! is_null($parts[1] ?? null)) {
|
||||
$builder->where('allocations.port', 'LIKE', "{$parts[1]}%");
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user