/**
  * Delete from database.
  *
  * @param $id
  * @return \Framework\Response\ResponseRedirect
  * @throws HttpNotFoundException
  */
 public function deleteAction($id)
 {
     if ($post = Post::delete((int) $id)) {
         return $this->redirect($this->generateRoute('home'), 'success', 'The post has been delete successfully!');
     } else {
         throw new HttpNotFoundException('Page Not Found!');
     }
 }