Skip to content

Trigger an error in the router #815

Answered by LukeTowers
WebVPF asked this question in Q&A
Discussion options

You must be logged in to vote

If you would like to return a rendered 404 page as seen in the backend then you can do the following:

return Response::make(View::make('backend::404'), 404);

If you would like to return the 404 page as configured in the frontend then you can do the following:

$controller = new Cms\Classes\Controller();
$controller->setStatusCode(404);
return $controller->run('404');

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@WebVPF
Comment options

@alisaracoglu
Comment options

Comment options

You must be logged in to vote
1 reply
@WebVPF
Comment options

Answer selected by WebVPF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants