id)->where('user_id', Auth::user()->id)->exists()) { return redirect()->route('judging.bonusScore.EntryList', $entry->audition)->with('error', 'You have already judged that entry'); } /** @var BonusScoreDefinition $bonusScore */ $bonusScore = $entry->audition->bonusScore()->first(); if (! $bonusScore->judges->contains(auth()->id())) { return redirect()->route('judging.index')->with('error', 'You are not assigned to judge that entry'); } $maxScore = $bonusScore->max_score; $bonusName = $bonusScore->name; return view('judging.bonus_entry_score_sheet', compact('entry', 'maxScore', 'bonusName')); } }