Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show welcome page for route not found handler #430

Open
Awilum opened this issue May 16, 2020 · 0 comments
Open

Show welcome page for route not found handler #430

Awilum opened this issue May 16, 2020 · 0 comments

Comments

@Awilum
Copy link
Member

Awilum commented May 16, 2020

We should have welcome page for route not found handler.
To avoid misunderstanding after Flextype Installation.

/**
 * Override the default Not Found Handler with Flextype Welcome page
 */
unset($app->getContainer()['notFoundHandler']);
$app->getContainer()['notFoundHandler'] = function ($flextype) {
    return function ($request, $response) use ($flextype) {
        $response = new \Slim\Http\Response(404);
        $page = file_get_contents(ROOT_DIR . '/src/flextype/welcome.html');
        return $response->write($page);
    };
};
@Awilum Awilum added this to the 0.9.9 milestone May 16, 2020
@Awilum Awilum self-assigned this May 16, 2020
@Awilum Awilum modified the milestones: 0.9.9, 0.9.10, 0.9.11 Aug 3, 2020
@Awilum Awilum modified the milestones: 0.9.11, 0.9.12 Aug 21, 2020
@Awilum Awilum modified the milestones: 0.9.12, 0.9.13, 0.9.14 Dec 2, 2020
@Awilum Awilum modified the milestones: 0.9.14, 1.0.0 Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant