Skip to content

Conversation

montanaflynn
Copy link

I made a small API middleware class to send errors for missing endpoints and circumvent the 404 page. A few other things are planned as well. Cheers!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The middleware class with the same functionality already exists here: Middleware/Jsonp.php

@montanaflynn
Copy link
Author

That only handles jsonp callback functions, and I referenced it in a commit.

Mine enures routes and bypasses slims 404 page. Anyways I use this as a starting template for my APIs and thought it would be useful for others as well. The catch all route was exceedingly hard to find documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants