access = new Access(); } public function index() { $posts = new Posts(); $posts->index(); return true; } public function login() { View::render('Access/login.html', [ 'token' => Token::generate() ]); return true; } // Methods public function put($args = []) { if ($this->access->login($args)) { $table = 'user'; $id = Session::get('userid'); $this->access->update($table, ['status' => 1], $id); } Redirect::to('/'); } public function logout() { if ($this->access->logout()) { Redirect::to('/'); } } }