only 6
This commit is contained in:
parent
5928c53488
commit
0446b31faa
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue