BUG 語法欄位下錯 20250523

This commit is contained in:
allen.yan 2025-05-23 09:46:33 +08:00
parent b9d7dfb694
commit 6b9e1c5e67

View File

@ -185,7 +185,7 @@ class RoomControlController extends Controller
$roomName = $matches[2]; // '101'
}
$branch=Branch::where('name',$validated['branch_name'])->first();
$room = Room::where('branch', $branch->id)
$room = Room::where('branch_id', $branch->id)
->where('name', $roomName)
->where('type', $roomType)
->first();