Hi,
I just begginer in Slim framework V2 and in my actual new project i’m trying to do a redirects like this:
$app->get('/', function() use ($app) {
$app->render('home.php');
})->name('home');
$app->get('/flash', function() use ($app) {
$app->flash('registerFlash', 'You have registred!!!');
$app->response->redirect($app->urlFor('home'), 301);
})->name('flash');
But the Slim doesn’t redirect. I try to use the $app->redirect($app->urlFor(‘home’), 301); function as discribed in http://docs.slimframework.com/routing/helpers/ but doesn’t work too.
Any idea, whats wrong with my redirects?
Thanks!