/** * Show the application welcome screen to the user. * * @return Response */ public function scraper() { $success = ''; $groups = Group::lists('name', 'group_id'); $locations = Location::lists('location', 'location_id'); //$tournaments = Tournament::orderBy('start_date', 'desc') // ->lists('name','tournament_id'); $tournaments = Tournament::selectRaw('CONCAT(name, " (", start_date, ")") as name, tournament_id')->orderBy('start_date', 'desc')->lists('name', 'tournament_id'); $players = Player::select('first_name', 'last_name', 'player_id', \DB::raw('CONCAT(first_name, " ", last_name) as full_name'))->orderBy('first_name')->orderBy('last_name')->get()->lists('full_name', 'player_id'); return view('admin.scraper', compact('groups', 'locations', 'tournaments', 'players', 'success')); }
/** * Display a listing of the resource. * * @return Response */ public function match($user_id, $match_id) { $tournaments = Tournament::selectRaw('CONCAT(name, " (", start_date, ")") as name, tournament_id')->where('start_date', '>=', '2016-10-01')->orderBy('start_date', 'desc')->lists('name', 'tournament_id'); $user = User::find($user_id); return view('pages/tools.referee.match', compact('tournaments', 'user', 'match_id')); }