mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 08:12:18 +00:00
Merge pull request #589 from mauroagr/patch-1
Update in error status code
This commit is contained in:
@@ -972,6 +972,12 @@ If you do not want a redirect, but want the error-page rendered on the current-u
|
||||
$request->setRewriteCallback('ErrorController@notFound');
|
||||
```
|
||||
|
||||
If you will set the correct status for the browser error use:
|
||||
|
||||
```php
|
||||
SimpleRouter::response()->httpCode(404);
|
||||
```
|
||||
|
||||
## Using custom exception handlers
|
||||
|
||||
This is a basic example of an ExceptionHandler implementation (please see "[Easily overwrite route about to be loaded](#easily-overwrite-route-about-to-be-loaded)" for examples on how to change callback).
|
||||
|
||||
Reference in New Issue
Block a user