mirror of
https://github.com/v2board/v2board.git
synced 2025-06-12 12:37:54 +08:00
add: server name check
This commit is contained in:
@ -357,4 +357,18 @@ class ServerService
|
||||
}
|
||||
return $server->toArray();
|
||||
}
|
||||
|
||||
public function serverIsExist($name):bool
|
||||
{
|
||||
if (ServerShadowsocks::where('name', $name)->first()) {
|
||||
return true;
|
||||
}
|
||||
if (ServerTrojan::where('name', $name)->first()) {
|
||||
return true;
|
||||
}
|
||||
if (Server::where('name', $name)->first()) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user