// Exceptions/Handler.PHP use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; public function render($request,\Exception $e) { if ($e instanceof MethodNotAllowedHttpException) { // … } return parent::render($request,$e); }