public function showNewAbsence($team, $event) { if ($event != null) { $event = Flight::events()->getEventWithId($event); } $team = Flight::teams()->getTeamWithId($team); Flight::util()->render('newAbsence', array('team' => $team, 'event' => $event)); }
public function deleteEvent($id) { Flight::auth()->check(); $event = Flight::events()->getEventWithId($id); $team_id = $event->team; $event->delete(); Flight::redirect("/team/" . $team_id); }