public function actionView($id) { $categories = CategoryModel::getAllUsingColumns(); $blog = BlogModel::getById($id); $view = new View(); $view->categories = $categories; $view->blog = $blog; $view->display('blog/view.php'); return true; }
public function actionDelete($id) { $blog = BlogModel::delete($id); if ($blog) { FL::redirectTo('/admin/blog'); } return true; }