protected final function render($template, $args = []) { $args['SERVER'] = $_SERVER; if (Session::get('flash')) { $args['flash'] = Session::get('flash'); Session::del('flash'); } return new Render($template, $args); }
/** * @route GET /logout */ public function logout() { Session::del('user'); return $this->redirect('/login'); }