/**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     view()->composer('tournament._form', function ($view) {
         $view->with('ratingListArrayIdKeyed', RatingList::lists('date_of_list', 'id'));
     });
     view()->composer('tournament.game._form', function ($view) {
         $view->with('playersArrayIdKeyed', Player::lists('name', 'id'));
     });
     view()->composer('tournament.game._form', function ($view) {
         $view->with('gameResultsArrayIdKeyed', GameResult::lists('title', 'id'));
     });
 }
Beispiel #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  Player $player
  * @return Response
  */
 public function destroy(Player $player)
 {
     $player->delete();
     session()->flash('status', 'Player has been deleted!');
     return redirect('player');
 }