Skip to content

v2.4.0

Compare
Choose a tag to compare
@izniburak izniburak released this 20 Jan 23:37
· 16 commits to master since this release

Updated error function to handle Not Found errors better. Now, you can use Request and Response instances in Closure parameters:

$router->error(function(Request $request, Response $response) {
    $response->setStatusCode(Response::HTTP_NOT_FOUND);
    $response->setContent('Oops! Page not found!');
    return $response;
});