mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Handle allocation assignment using services
Function is significantly quicker and uses 1 SQL query per IP rather than 1 query per port.
This commit is contained in:
@@ -113,10 +113,8 @@ class NodeRepository extends SearchableRepository implements NodeRepositoryInter
|
||||
|
||||
$instance->setRelation(
|
||||
'allocations',
|
||||
$this->getModel()->allocations()->orderBy('ip', 'asc')
|
||||
->orderBy('port', 'asc')
|
||||
->with('server')
|
||||
->paginate(50)
|
||||
$instance->allocations()->orderBy('ip', 'asc')->orderBy('port', 'asc')
|
||||
->with('server')->paginate(50)
|
||||
);
|
||||
|
||||
return $instance;
|
||||
|
||||
Reference in New Issue
Block a user