src/AbstractApp.php
public static function redirect(
		\Slim\Slim $slim, $name, $to, $routeName = null
	) {
		$routeName = $routeName ?: $name;

		$slim->get( $name, function () use ( $slim, $name, $to ) {
			$slim->flashKeep();
			$slim->redirect( $slim->urlFor( $to ) );
		} )->name( $routeName );
	}
public static function redirect(
		\Slim\Slim $slim, $name, $to, $routeName = null
	) {
		$routeName = $routeName ?: $name;

		$slim->get( $name, function () use ( $slim, $name, $to ) {
			$slim->flashKeep();
			$slim->redirect( $slim->urlFor( $to ) );
		} )->name( $routeName );
	}
public static function redirect ( \ Slim \ Slim $ slim , $ name , $ to , $ routeName = null ) { $ routeName = $ routeName ? : $ name ; $ slim -> get ( $ name , function ( ) use ( $ slim , $ name , $ to ) { $ slim -> flashKeep ( ) ; $ slim -> redirect ( $ slim -> urlFor ( $ to ) ) ; } ) -> name ( $ routeName ) ; }
Add a redirect route to the app.
@param \Slim\Slim $slim App
@param string $name Page name
@param string $to Redirect target route name
@param string $routeName Name for the route
Add a redirect route to the app .