We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Add a route for 404 as your last route. If no other routes are matched, the specified callback will be called.
404
<?php respond('404', function ($request) { $page = $request->uri(); echo "Oops, it looks like $page doesn't exist..\n"; });
But I need some other route(s) for setting up layouts, etc.
If you don't want a certain respond() call to be counted as a match, just call it without a route:
respond()
<?php respond(function ($request, $response, $app) { $response->layout('layout.phtml'); //etc. });