mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-30 17:02:04 +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