public function GET__0() { if (Auth::isAuthenticated()) { $this->redirect(); } $alerts = []; if (isset($_POST['password'], $_POST['login'])) { $login = $_POST['login']; $password = $_POST['password']; if (Auth::tryLogin($login, $password)) { $this->redirect(); } else { $alerts[] = 'Błędne dane'; } } $template = $this->includeTemplate('dashboard/login'); $template->alerts = $alerts; $template->render(); }