/** * Display a listing of the resource. * * @return Response */ public function index($player, $entry, $target_id) { $self_evals = PlayerEvaluation::where('player_id', '=', $target_id)->where('creator_id', '=', $player->player_id)->orderBy('created_at', 'desc')->paginate(5); $peer_evals = PlayerEvaluation::where('player_id', '=', $target_id)->where('creator_id', '!=', $player->player_id)->orderBy('created_at', 'desc')->paginate(5); $opp_evals = PlayerEvaluation::where('player_id', '!=', $target_id)->where('creator_id', '=', $player->player_id)->orderBy('created_at', 'desc')->paginate(5); return view('pages/players/journal/evaluation/index', compact('player', 'target', 'entry', 'self_evals', 'peer_evals', 'opp_evals')); }
public function listEvaluations($player, $opponent, $entry) { $evaluations = PlayerEvaluation::where('player_id', '=', $opponent->player_id)->where('creator_id', '=', $player->player_id)->orderBy('created_at', 'desc')->paginate(10); return view('pages/players/journal/opponent/evaluation/index', compact('player', 'entry', 'evaluations')); }