/** * Display the specified resource. * * @param int $id * @return Response */ public function show(Request $request, Vote $votes) { $player1ID = Input::get('ddlPlayer1'); $player2ID = Input::get('ddlPlayer2'); $players_list = Player::orderby('last_name')->orderby('first_name')->get()->lists('last_first_name', 'player_id'); $player1 = Player::where('player_id', '=', $player1ID)->first(); $player2 = Player::where('player_id', '=', $player2ID)->first(); $h2h = new Match(); $head2head = $h2h->head2head($player1ID, $player2ID); $skills = Skill::orderby('skill_id')->get(); $voter_id = \Auth::user()->id; return view('pages/matchups.show', compact('players_list', 'player1', 'player2', 'head2head', 'skills', 'votes', 'voter_id')); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($player, $entry, $opponent_id) { $opponent = Player::find($opponent_id); $opplog = []; // OpponentLog::where('opponent_id' , '=', $opponent_id); //Match History $h2h = new Match(); $head2head = $h2h->head2head($player->player_id, $opponent->player_id); //Evaluation $evaluation_id = 28; // get opponent evalution_id by table PlayerID -> entry_ID -> Opponent_id $categories = EvaluationCategory::all(); $evaluation = PlayerEvaluation::find($evaluation_id); $scores = EvaluationScore::where('evaluation_id', '=', $evaluation_id); //Notes // // // return view('pages/players/journal/opponent/show', compact('player', 'entry', 'opponent', 'opplog', 'head2head', 'evaluation', 'categories', 'scores')); }