/** * Display the home page. * * @return Response */ public function index() { $teamResults = Team::orderBy('team_points', 'desc')->take(10)->get(); $matchDb = new Match(); $match = $matchDb->join('fantasy_club as home', 'fantasy_match.home_club_id', '=', 'home.club_id')->join('fantasy_club as guest', 'fantasy_match.guest_club_id', '=', 'guest.club_id')->select('home.club_name as home_name', 'guest.club_name as guest_name', 'match_date')->get(); return view('front.index')->with('teamResults', $teamResults)->with('j', $j = 1)->with('matches', $match); }