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