main
liutk 2024-05-25 12:15:53 +08:00
parent e428027678
commit abd0ae0029
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ class ActivityGameResource extends JsonResource
'game_at_comparison_now' => now()->gte($this->game_at), 'game_at_comparison_now' => now()->gte($this->game_at),
'mark' => $this->mark, 'mark' => $this->mark,
'has_guess' => !$this->logs->isEmpty() ? ($this->logs[0]->score):false, 'has_guess' => !$this->logs->isEmpty() ? ($this->logs[0]->score):false,
'has_guess_right' => !$this->logs->isEmpty() ? ($this->logs[0]->is_right):false,
'state' => $this->state, 'state' => $this->state,
]; ];
} }