예제 #1
0
 /**
  * Update the new points for all the teams.
  *
  * @return RedirectResponse
  */
 public function postChampionship()
 {
     foreach (Team::whereNotNull('faction_id')->get() as $team) {
         $input = Request::input('team-' . $team->id);
         if ($input !== null) {
             $team->points = $input;
             $team->save();
         }
     }
     return $this->success('Les points ont été mis à jour !');
 }