Esempio n. 1
0
 public function saveNewTeam()
 {
     Flight::auth()->check(20);
     $response = Flight::util()->validate('team', Flight::request()->data);
     if (is_array($response)) {
         Flight::util()->render('newTeam', array("error" => $response));
         return;
     }
     $team = new team(Flight::request()->data);
     $last_id = $team->store();
     Flight::redirect('/team/' . $last_id);
 }