public function deleteAction($id = false) { $this->permission('delete'); if (!$id) { return Brightery::error404(); } $model = new \modules\pages\models\Pages(); $model->page_id = $id; if ($model->delete()) { Uri_helper::redirect("management/pages"); } }
public function indexAction($page = null) { if (!$page) { Brightery::error404(); } $model = new \modules\pages\models\Pages(); $model->language_id = $this->language->getDefaultLanguage(); $model->seo = $page; $res = $model->get(); if (!$res) { Brightery::error404(); } return $this->render('pages/index', ['item' => $res]); }