Exemplo n.º 1
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     view()->composer('frontend.main', function ($view) {
         $view->with('teamData', Team::find(config('mls.team_id')));
         $view->with('trainingData', TrainingRepository::getActiveList(config('mls.team_id')));
     });
 }
Exemplo n.º 2
0
 public function index()
 {
     $team = Team::find(config('mls.team_id'));
     $playerList = PlayerRepository::getActiveListByTeamId($team->id);
     $gameList = GameRepository::getListByTeamId($team->id);
     $trainingList = TrainingRepository::getActiveList($team->id);
     $statList = StatRepository::getPlayersStatistics($playerList);
     return view('frontend.teams.view')->with('team', $team)->with('playerList', $playerList)->with('gameList', $gameList)->with('trainingList', $trainingList)->with('statList', $statList);
 }