function list_action() { $postsModel = new PostsModel(); $posts = $postsModel->get_all_posts(); $html = render_template('view/template/list.php', array('posts' => $posts)); return $html; //require "view/template/list.php"; }
function list_action() { $model = new PostsModel(); $posts = $model->get_all_posts(); $html = render_template('View/Templates/list.php', array('posts' => $posts)); return $html; }
function delete_action($id) { $postsModel = new PostsModel(); $postsModel->delete_post($id); $posts = $postsModel->get_all_posts(); $html = render_template('view/template/admin.php', array('posts' => $posts)); return $html; }
function delete_action($id) { $postsModel = new PostsModel(); $postsModel->delete_post($id); $posts = $postsModel->get_all_posts(); $html = render_template("View/Templates/admin.php", array('posts' => $posts)); return $html; /*function delete_action($id) { delete_post($id); $posts = get_all_posts(); $html=render_template("View/Templates/admin.php",array('posts'=>$posts)); return $html; }*/ }