public function actionDelete() { $news = new NewsModel(); $news->id = $_GET['id']; $news->delete(); header("Location: /index.php?ctrl=Admin&act=All"); }
public function delete($id) { $news_model = new NewsModel(); $news_model->delete($id); $this->redirect('index'); }