redirect na jine stranky v router factory
- jiri.pudil
- Nette Blogger | 1032
Ano, předej do routy namísto metadat callback:
$router[] = new Route('test.php', function ($presenter) {
$presenter->redirectUrl('https://google.com');
});
- AntiCZ
- Člen | 13
Musí tam být return. Oprava z jiné odpovědi
$router[] = new Route('test.php', function ($presenter) {
return $presenter->redirectUrl('https://google.com');
});
$router[] = new Route('test.php', function () {
return new Nette\Application\Responses\RedirectResponse($url);
});
Editoval AntiCZ (31. 1. 2018 10:05)