Пример #1
0
 public function getAllLeague()
 {
     $isValidToken = User::checkAuth();
     if ($isValidToken != 0) {
         $allLeagues = League::getAllLeague();
         return \Response::json($allLeagues, 200);
     } else {
         return json_encode("Please enter valid Authentication Token");
     }
 }
Пример #2
0
 public function league()
 {
     $baseURL = '../public/';
     $user = Auth::user();
     $allLeague = League::getAllLeague();
     $allLeagueID = League::getAllLeaguebyGroup();
     foreach ($allLeagueID as $league) {
         $lottery = Lottery::getLottriesOfLeague($league->league_id);
         $bowlers = League::getBowlersinLeague($league->league_id);
         $bowlersInLeague[$league->league_id][] = ['league_id' => $league->league_id, 'league_name' => $league->league_name, 'bowlers' => $bowlers, 'lottery' => $lottery];
     }
     return \View::make('league')->with('allLeague', $allLeague)->with('bowlersInLeague', $bowlersInLeague)->with('baseURL', $baseURL);
 }
Пример #3
0
 public function getAllLeague()
 {
     $allLeagues = League::getAllLeague();
     return \Response::json($allLeagues, 200);
 }