Closed ghost closed 5 years ago
The withRedirect
method takes two arguments, the URL and then the status code. See the Returning a Redirect documentation for more info. So it would look more like this:
withRedirect($router->pathFor('dashboard'), 301);
Ok! Thanks!!
I've use slim for make only url rewrite and friendly url's, it's a good framework, love it!!! But need make redirect for a page after user make login! i've using php-view! In pure php: header("Location: views/dashboard.php"), but on slim, how make this? Trying: return $response = new Slim\Http\Response::withRedirect('Location', $router->pathFor('dashboard')) but don't works! and I don't use MVC!!!