cms.page.display

Triggered in Cms\Classes\Controller.

Provides an opportunity to modify the response after the page for the URL has been processed. $result could be a string representing the HTML to be returned or it could be a Response instance.

Example usage:

Event::listen('cms.page.display', function ((\Cms\Classes\Controller) $controller, (string) $url, (\Cms\Classes\Page) $page, (mixed) $result) {
    if ($url === '/tricked-you') {
        return Response::make('Boo!', 200);
    }
});

Or

$controller->bindEvent('page.display', function ((string) $url, (\Cms\Classes\Page) $page, (mixed) $result) {
    if ($url === '/tricked-you') {
        return Response::make('Boo!', 200);
    }
});