Exemple #1
0
 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);
 }
Exemple #2
0
 /**
  * @route GET /logout
  */
 public function logout()
 {
     Session::del('user');
     return $this->redirect('/login');
 }