This commit is contained in:
RundelhausCode 2021-04-07 14:37:22 +02:00
parent 5928c53488
commit 0446b31faa
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ if (!isAdmin()){
$gameJamId = $_GET['gameJamId'];
$game_jam = GameJam::find($gameJamId);
$all_group_in_game_jam_id = Group::where("game_jam_id", $game_jam->id)->pluck("id")->toArray();
$find_all_keywords = KeyWord::whereIn("group_id", $all_group_in_game_jam_id)->inRandomOrder()->get();
$find_all_keywords = KeyWord::whereIn("group_id", $all_group_in_game_jam_id)->inRandomOrder()->take(6)->get();
$game_jam->key_word = $find_all_keywords->first()->key_word;
if(!$game_jam->save()){
http_response_code(500);