Exemple #1
0
 public function deleteAction(Movies $movie)
 {
     if ($this->request->isPost()) {
         $movie->delete();
         return $this->redirectByRoute(['for' => 'movies.index']);
     } else {
         $this->view->movie = $movie;
     }
 }