/**
  * 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');
 }
Exemple #2
0
 function removeAction($id)
 {
     Post::remove((int) $id);
     return $this->redirect($this->generateRoute('list_post'), 'Post ' . $id . ' was remove successfully!');
 }