mirror of
https://github.com/getformwork/formwork.git
synced 2025-01-17 05:28:20 +01:00
Add shortcuts to ErrorsController
This commit is contained in:
parent
4cdeb99192
commit
f5ab91a42d
@ -37,4 +37,19 @@ class ErrorsController extends AbstractController implements ErrorsControllerInt
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
public function notFound(): Response
|
||||
{
|
||||
return $this->error(ResponseStatus::NotFound);
|
||||
}
|
||||
|
||||
public function internalServerError(Throwable $throwable): Response
|
||||
{
|
||||
return $this->error(ResponseStatus::InternalServerError, $throwable);
|
||||
}
|
||||
|
||||
public function forbidden(): Response
|
||||
{
|
||||
return $this->error(ResponseStatus::Forbidden);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user