public function execute() { if (!Session::has('user')) { $this->template->setHeaderLogin('login', __DIR__); } $this->template->setBody('Home/Views/home'); $this->template->render(); }
public function execute() { if (Session::has('username')) { $this->response->redirect('/'); } $this->template->setBody('User/Views/login'); $this->template->render(); }
/** * @return mixed */ public static function getMessage() { if (!Session::has('message')) { return false; } $message = Session::get('message'); Session::delete('message'); return $message; }