Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Redirect not working #54

@sharomet

Description

@sharomet

Hi.
I have a problem.
Why does not it work redirect?

$app = new \Slim\App();
$app->get('/', function ($request, $response, $args) {
return $response->withRedirect($this->router->pathFor('name'));//not work
});

$app->get('/auth/signup', function ($request, $response, $args) {
return 'Hello';
})->setName('name');

$app -> run();

or


$app->get('/', function ($req, $res, $args) {
  return $res->withStatus(302)->withHeader('Location', '/auth/signup'); //Not work
});

Thanks!,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions