public function deletecardAction() { $this->view->disable(); $id = $this->request->getPost('id'); $cards = Cards::findFirst("id = '" . $id . "'"); if ($cards->delete() == false) { echo false; } else { echo true; } }