コード例 #1
0
 /**
  * Serves for removing post
  *
  * @route /posts/{$id}/remove
  * @param $id
  * @return \Framework\Response\ResponseRedirect
  */
 function removeAction($id)
 {
     Post::remove($id);
     return $this->redirect('/', 'The post has been deleted');
 }
コード例 #2
0
ファイル: BlogController.php プロジェクト: steemd/framework
 function removeAction($id)
 {
     Post::remove((int) $id);
     return $this->redirect($this->generateRoute('list_post'), 'Post ' . $id . ' was remove successfully!');
 }