Skip to content

Commit 8d56c0e

Browse files
committed
undo cast on room->player_id
1 parent 3037e8e commit 8d56c0e

File tree

3 files changed

+52
-41
lines changed

3 files changed

+52
-41
lines changed

.idea/workspace.xml

+47-37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/Events/UserJoin.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function broadcastAs()
4343

4444
public function broadcastWith()
4545
{
46-
return ['count' => count($this->room->player_id)];
46+
$current_player = unserialize($this->room->player_id);
47+
return ['count' => count($current_player)];
4748
}
4849
}

app/Room.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Room extends Model
88
{
99
protected $fillable = ['soals_id', 'master_id', 'player_id', 'status', 'kode'];
10-
protected $casts = [
11-
'player_id' => 'array',
12-
];
10+
// protected $casts = [
11+
// 'player_id' => 'array',
12+
// ];
1313
}

0 commit comments

Comments
 (0)