Skip to content

Commit 87abb0e

Browse files
committed
bug bug
1 parent 55e52f8 commit 87abb0e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/Http/Controllers/RoomController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function soalFromPaketSoal(Request $request){
8686
}
8787

8888
public function start(Request $request, $id_room){
89-
$room = Room::all()->where('kode', $id_room);
89+
$room = Room::all()->where('kode', $id_room)->first();
9090
$room->status = 1;
9191
//broadcast
9292
broadcast(new RoomStart($room))->toOthers();

resources/views/room/room.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ function progress(timeleft, timetotal, $element) {
246246
$(temp).removeClass("d-none");
247247
}
248248
else{
249-
var id_rom = $("#form_"+val+" input[name=id_room]").val();
250-
window.location.href = "room/" + id_rom +"/scoreboard";
249+
var id_rom = $("input[name=id_room]")[0].value;
250+
window.location.href = id_rom +"/scoreboard";
251251
}
252252
}
253253
};

resources/views/waiting.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
</div>
176176

177177
</div>
178-
178+
179179
<div class="button-play" onclick="location.href='{{url('/play')}}';">
180180
<button class="button">
181181
<span>Play Now</span>
@@ -207,7 +207,7 @@
207207
imgName[0] = String(data.count);
208208
imgName = imgName.join('.');
209209
temp[temp.length - 1] = imgName;
210-
temp = temp.join('/')
210+
temp = temp.join('/');
211211
document.querySelector('.num-player').firstElementChild.src = temp;
212212
});
213213
channel.bind('room.start', function (data) {

0 commit comments

Comments
 (0)