This is the first time I'm using Slim framework, and everything is still happening. But there is one thing that I cannot say about. After the form is published, I would like to redirect back to the same page, but it uses the parameter in the URL, and I cannot return to it. This is what I still have:
$app->post('/markets-:game', $authenticated(), function($game) use ($app) {
$request = $app->request();
$id = $request->post('game3');
$app->flash('global', 'game added');
$app->response->redirect($app->urlFor('games.markets', {"game:$id"}));
})->name('games.markets.post');
Any help would be greatly appreciated. Thanks
source
share