BUG 修正
This commit is contained in:
parent
f0d9070858
commit
42bf78df8c
@ -289,7 +289,7 @@ class RoomControlController extends Controller
|
||||
$roomType = null;
|
||||
$roomName = null;
|
||||
// 從 room_name(例如 PC101, SVR01)中擷取 type 與 name
|
||||
if (preg_match('/^([A-Za-z]+)(\d+)$/', $validated['hostname'], $matches)) {
|
||||
if (preg_match('/^([A-Za-z]+)(\d+)$/', $validated['room_name'], $matches)) {
|
||||
$roomType = strtolower($matches[1]); // 'PC' → 'pc'
|
||||
$roomName = $matches[2]; // '101'
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user