|string> */ public function rules(): array { return [ 'playerId' => 'required|string', 'matchId' => 'present', 'playerRole' => 'required|string', 'faction' => ['required', Rule::enum(Faction::class)], 'endState' => 'string', 'group' => 'string', 'region' => 'string', 'groupSize' => 'required|int', 'beginTime' => 'required|int', 'endTime' => 'required|int', 'eventType' => 'required|string' ]; } protected function passedValidation() { $this->playerId = $this->input('playerId'); $this->matchId = $this->input('matchId'); $this->playerRole = $this->input('playerRole'); $this->faction = Faction::tryFrom($this->input('faction')); $this->endState = $this->input('endState'); $this->group = $this->input('group'); $this->region = $this->input('region'); $this->groupSize = $this->input('groupSize'); $this->beginTime = $this->input('beginTime'); $this->endTime = $this->input('endTime'); $this->eventType = $this->input('eventType'); } }