Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 7, 2018 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/24cde51ac51a93bf1bccb46bc2d3a161 to your computer and use it in GitHub Desktop.
Save parzibyte/24cde51ac51a93bf1bccb46bc2d3a161 to your computer and use it in GitHub Desktop.
<?php
try {
echo json_encode($despachador->dispatch($metodo, $rutaLimpia)); # Notar el json_encode
} catch (HttpRouteNotFoundException $e) {
echo "Error: Ruta no encontrada";
} catch (HttpMethodNotAllowedException $e) {
echo "Error: Ruta encontrada pero método no permitido";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment